I have a simple grid running in Batch Edit mode. Need to disable column "Division" and change its color by clicking an outside button. My code gets executed but nothing changes. This column's color gets set by applying custom CSS using
background-color: white !important;. My code assigns a different CSS with another color.
ASPX:
<telerik:GridBoundColumn DataField="Division" HeaderText="Division" UniqueName="Division"></telerik:GridBoundColumn>
VB cb:
Protected Sub btnApprove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApprove.Click
Dim Item As GridDataItem
For Each Item In RadGrid1.MasterTableView.Items
If (Item.IsDataBound) Then
Dim col As GridBoundColumn = CType(RadGrid1.MasterTableView.GetColumn("Division"), GridBoundColumn)
col.ItemStyle.CssClass = "customGriglinesGray"
col.ReadOnly = True
End If
Next
End Sub
background-color: white !important;. My code assigns a different CSS with another color.
ASPX:
<telerik:GridBoundColumn DataField="Division" HeaderText="Division" UniqueName="Division"></telerik:GridBoundColumn>
VB cb:
Protected Sub btnApprove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApprove.Click
Dim Item As GridDataItem
For Each Item In RadGrid1.MasterTableView.Items
If (Item.IsDataBound) Then
Dim col As GridBoundColumn = CType(RadGrid1.MasterTableView.GetColumn("Division"), GridBoundColumn)
col.ItemStyle.CssClass = "customGriglinesGray"
col.ReadOnly = True
End If
Next
End Sub