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

RadComboBox in a NestedViewTemplate of RagGrid

2 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos Amigo
Top achievements
Rank 1
Carlos Amigo asked on 14 Sep 2011, 02:33 AM
I have a rather complicated scenario:
-> Ragdrid (Grouped Data)
    -> NestedViewTemplate
        -> RadGridDetail (Ungrouped or Detail of data, here users can edit data)
            -> GridTemplateColumn
                -> EditItemtemplate
                    -> RadComboBox (For insert or update)
                    -> Imagebutton (open RadWindow)

On insert or update, the ImageButton is enabled and open a RadWindow, with a CRUD of a table that populate the RadComboBox.
When I run any command of CRUD, I need to reload all items of RadComboBox. How I can to do this? (or where can I find info about this?)

Thank in advance

Charly 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Sep 2011, 06:22 AM
Hello Carlos,

If you want to access the RadComboBox inside EditItemTemplate of inner Grid, first access the EditForm and then get the control like below.

C#:
GridEditFormItem editedItem = (GridEditFormItem)RadGridDetail.MasterTableView.GetItems(GridItemType.EditFormItem)[0]; // get the edit form of inner Grid
 RadComboBox combo= (RadComboBox)editedItem.FindControl("RadComboBox1"); //accessing RadComboBox in edit form
//reload combo


Thanks,
Princy.
0
Carlos Amigo
Top achievements
Rank 1
answered on 15 Sep 2011, 03:24 PM
Princy: Thank you for your feedback. I've another questions about this.
In your code...
GridEditFormItem editedItem = (GridEditFormItem)RadGridDetail.MasterTableView.GetItems(GridItemType.EditFormItem)[0]; // get the edit form of inner Grid
RadComboBox combo = (RadComboBox)editedItem.FindControl("RadComboBox1"); //accessing RadComboBox in edit form

...you started with RadGridDetail, and this object, is inside of RadGrid1 (nested grids).
How I can to obtain my RadGridDetail for the selected, (opened) RadGrid1 row?
How I can refresh my RadComboBox1 when RadWindow close? (RadAjaxManager.AjaxRequest?)
Have you any "code snippet"?
Thank you.
Tags
Grid
Asked by
Carlos Amigo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Carlos Amigo
Top achievements
Rank 1
Share this question
or