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

1 回答 1

4

在你的 CSS 文件中尝试这样的事情:

 .k-state-active, .k-state-active:hover, .k-active-filter {
 background-color: rgba(0, 133, 255, 0.59) !important;
 }
于 2012-12-11T15:19:12.517 回答