6 Answers, 1 is accepted
Please try the following code snippet to disable a checkbox list in Edit Mode.
thanks for your help, but I want to disable just one option in the checkboxlist.
the checkboxlist hs 3 items I want to disable one of them based on its name
~but cant find that checkboxlist :S
When you are using a CheckBoxList,which is inside a template column,you can access it only using findcontrol.Please try the following code.
for exemple i'm using it on update command this to catch a simple texto on textbox
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
GridEditFormItem data = e.Item as GridEditFormItem;
TextBox txt = (TextBox)data["Email"].Controls;
new_email = txt.Text;
so why for the checkboxlist, item databound it wont work at all
here is my code:
i have deleted the code since it dont work....
also the code to hide user it working but for exemple we have in the grid a gray and then a white row and because i'm hidding one it creates 2 whites because the gray is hidden :S
Please add the code to create the checkbox in ItemCreated Event of the radgrid.Please try the following code snippet.