This is a migrated thread and some comments may be shown as answers.

"global" access to editform

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reto Zbinden
Top achievements
Rank 1
Reto Zbinden asked on 14 Oct 2010, 05:49 PM
i'm a little stuck, after i was able to bind an event _SelectedIndexChanged to a combobox of a editform.
now i'm receiving the event in a handler ..._SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs),
but now i'm supposed to feed another column/textbox of the grid with a value based on the selecteed value of the combobox.

i can imagine (/read somewhere) a solution would be the creation of a custom editform and then using a panel or something to "findcontrol" the textbox, but my editform is generated auto, so is there a way? 
of course
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim editMan As GridEditManager = editedItem.EditManager
If (CType(editedItem.Item("Value1").Controls(0), RadNumericTextBox).Text) > 0 then.... etc.

doens't bind to e.item which is RadComboBoxSelectedIndexChangedEventArgs,
so can i get to the editForm through RadGrid1.Mastertableview. ...? Or via FIndControl("..") ?

Regards
Reto

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 20 Oct 2010, 08:58 AM
Hello Reto,

The edit form of the grid is the naming container of the combo - it can be accessed using sender.NamingContainer in the SelectedIndexChanged event of the combo. Then, you can locate the controls in it as it is explained in the Accessing the value of cells in edit mode section of the Accessing cells and rows help topic.

I hope this helps.

Best wishes,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Reto Zbinden
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or