Hi ,
I would like to disable a particular row based on a particular label name for instance "TEST", so if the Row has label name = "TEST", I would like to disable that entire row. There are two problems that I am facing.
1. I have a GridClientSelectColumn, and I'm inclined to thinking this the cause of the issue.
2. The row is being disabled only after a postback has occured. But on initial load it is not being disabled.
For Each item As GridDataItem In grdVisibleColumns.MasterTableView.Items
If item.Cells(3).Text = "TEST" Then
item.Enabled = False
Dim chkbx As CheckBox = DirectCast(item("grdVisibleChkBox").Controls(0), CheckBox)
chkbx.Enabled = False
End If
Next
I put this code in the page pre-render event BTW, I tried placing the code in a number of places (Grid events), but it did not help, when the page initially loads the Row TEST is enabled.
Please advise.
Thanks.
Chandra
I would like to disable a particular row based on a particular label name for instance "TEST", so if the Row has label name = "TEST", I would like to disable that entire row. There are two problems that I am facing.
1. I have a GridClientSelectColumn, and I'm inclined to thinking this the cause of the issue.
2. The row is being disabled only after a postback has occured. But on initial load it is not being disabled.
For Each item As GridDataItem In grdVisibleColumns.MasterTableView.Items
If item.Cells(3).Text = "TEST" Then
item.Enabled = False
Dim chkbx As CheckBox = DirectCast(item("grdVisibleChkBox").Controls(0), CheckBox)
chkbx.Enabled = False
End If
Next
I put this code in the page pre-render event BTW, I tried placing the code in a number of places (Grid events), but it did not help, when the page initially loads the Row TEST is enabled.
Please advise.
Thanks.
Chandra