2012-12-11 53 views
3

細胞我有這個問題,我並不能解決...這裏是我的網格如何更換過濾器顏色已被過濾

$("#grid").kendoGrid({ 
    dataSource: { 
     type: "application/jsonp", 
     transport: { 
      read: { 
       url: "http://" + servername + "/uBillingServices/Administration/Administration.svc/getPriceList", 
       dataType: "json", 
       //type: "POST", 
       data: { 
        ValidFrom: denes 
       } 
      } 
     }, 
     batch: false, 
     schema: { 
      model: { 
       id: "PriceListType_ID", 
       fields: { 
        ID: { 
         type: "number", 
         editable: false, 
         validation: { 
          required: true 
         }, 
         nullable: false 
        }, 
        PriceListType_ID: { 
         type: "number", 
         editable: false, 
         validation: { 
          required: true 
         }, 
         nullable: false 
        }, 
        PriceListType_Name: { 
         type: "string", 
         editable: false, 
         validation: { 
          required: true 
         }, 
         nullable: false 
        }, 
        BillingItem_ID: { 
         type: "number", 
         editable: false, 
         validation: { 
          required: true 
         } 
        }, 
        BillingItem_Name: { 
         type: "string", 
         editable: false, 
         validation: { 
          required: true 
         } 
        }, 
        FromConsumption: { 
         type: "number", 
         validation: { 
          required: true 
         }, 
         editable: true 
        }, 
        ValidFrom: { 
         type: "date", 
         validation: { 
          required: true 
         }, 
         editable: true 
        }, 
        Price: { 
         type: "number", 
         validation: { 
          required: true 
         }, 
         editable: true 
        }, 
        AllowDelete: { 
         type: "number", 
         validation: { 
          required: true 
         }, 
         editable: true 
        } 
       } 
      } 
     }, 
     pageSize: 10 
    }, 
    //select: function() {$("#grid").style.visibility="visible";}, 
    change: function(arg) { 
     $("#Meni")[0].childNodes[0].style.visibility = "visible"; 
     Selectedrow = this.select(); 
     if (this.dataItem(Selectedrow).AllowDelete) { 
      $("#Meni")[0].childNodes[1].style.visibility = "visible"; 
     } 
     selectedID = this.dataItem(Selectedrow).ID; 
     selectedPriceList = this.dataItem(Selectedrow).PriceListType_Name; 
     selectedPriceListID = this.dataItem(Selectedrow).PriceListType_ID; 
     selectedBillingItem = this.dataItem(Selectedrow).BillingItem_Name; 
     selectedBillingItemID = this.dataItem(Selectedrow).BillingItem_ID; 
     selectedFromConsumption = this.dataItem(Selectedrow).FromConsumption; 
     var tempselectedValidFrom = this.dataItem(Selectedrow).ValidFrom; 
     selectedValidFrom = formatDate(tempselectedValidFrom); 
     selectedPrice = this.dataItem(Selectedrow).Price; 
     //selectedFilter = this.dataItem(SelectedCell).Filter; 
    }, 
    scrollable: true, 
    selectable: true, 
    height: 388, 
    filterable: true, 
    pageable: { 
     numeric: true, 
     pageSizes: true, 
     previousNext: false 
     //refresh: true 
    }, 
    columns: [ 
     { 
     field: "PriceListType_Name", 
     title: "Price List"}, 
    { 
     field: "BillingItem_Name", 
     title: "Billing Item"}, 
    { 
     field: "FromConsumption", 
     title: "Consumption"}, 
    { 
     field: "ValidFrom", 
     title: "Valid From", 
     format: "{0:yyyy-MM-dd}"}, 
    { 
     field: "Price", 
     title: "Price", 
     format: "{0:c}"} 
    ] 
}).data("kendoGrid");​ 

我做它是過濾,知道我要訪問過濾器,以便當我點擊過濾器並進行過濾時,過濾器顏色發生變化(或者過濾器的背景可能已經過濾)

我很新,所以我真的需要你的幫助

謝謝

回答

4

嘗試這樣的事情在你的CSS文件:

.k-state-active, .k-state-active:hover, .k-active-filter { 
background-color: rgba(0, 133, 255, 0.59) !important; 
} 
+0

非常感謝它幫了不少:) – NFeskova

+0

將其標記爲答案,請。 –