9 Answers, 1 is accepted
One suggestion will be to access the CheckBox from the insert form when the Grid is in the Insert mode and set its display to none. So that when you perform an Insert operation it will insert 0 value for the CheckBox. Here is the code I implemented to hide the CheckBox:
First of all, thanks for your answer and your time! And Sorry for my late reply..
I have a question for you, if I have a hierarchical datagrid and the field we are talking about is in the second detail table, do I have to change something in your code as it doesn't enter in the if statement....
Thanks in advance
You can access the checkbox during InsertMode of DetailTable by naking use of the DetailTables name property as shown below:
Unfortunely this doesn't work with
But it kind of work with InLine EditMode. I say "kind of work" because it shows the column but hide the checkbox. So I see the header of the column. Anyway, I use EditForms mode everywhere so I would really like to have a way to do this with this mode...
Do you have any solution?
ok, Now it enter in the itemDatabound. Here is my code
(TypeOf e.Item Is GridEditFormInsertItem) AndAlso (e.Item.OwnerTableView.IsItemInserted = True) AndAlso (e.Item.OwnerTableView.Name = "GTVOffre") Then
Dim insertItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
Dim chkbx As CheckBox = DirectCast(insertItem("COURRIEL_ENVOYE").Controls(0), CheckBox)
The problem I got is that it hide the checkbox in insert mode but it shows the label beside...
Does it has a way to hide the checkbox and its label in insert mode?
Please test the following modification:
I hope this helps.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
That's solved my issue!