【问题标题】:How to add cssClass in a grid column in syncfusion grid grouping control?如何在syncfusion网格分组控件的网格列中添加cssClass?
【发布时间】:2017-12-11 04:10:50
【问题描述】:

我需要在 rowdatabound 事件的同步融合网格分组控件中为特定网格列添加一个 cssclass。我不知道语法。请帮帮我。

【问题讨论】:

    标签: grid syncfusion


    【解决方案1】:
    Refer the below code example for using the  cssClass inside the RowDataBound event. Here you can use apply custom css based on your contidion 
    
    //Enable RowDataBound event
                this.GridGroupingControl1.RowDataBound += new RowDataBoundEventHandler(GridGroupingControl1_RowDataBound);
    
    void GridGroupingControl1_RowDataBound(object sender, RowDataBoundEventArgs e)
            {
                if (e.Element.Kind == DisplayElementKind.Record)
                {
                    for (int i = 0; i < e.Row.Cells.Count; i++)
                    {
    
                        if (((Syncfusion.Web.UI.WebControls.Grid.Grouping.GridCell)(e.Row.Cells[i])).ColumnDescriptor.Name == "ShipCity")
                        {//Apply cssClass inside the RowDataBound event
                            e.Row.CssClass = "MyClass";
                        }
                    }
                }
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多