2017-12-11 14 views

答えて

0
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"; 
        } 
       } 
      } 
     } 
関連する問題