"global" access to editform

2 posts, 0 answers
  1. Reto Zbinden
    Reto Zbinden avatar
    3 posts
    Member since:
    Apr 2010

    Posted 14 Oct 2010 Link to this post

    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
  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 20 Oct 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top