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

AJAX Cascadingdropdown inside Grid Edit

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
fred williams
Top achievements
Rank 1
fred williams asked on 11 Jul 2010, 03:22 AM
Is it possible to use the cascading dropdown extender inside of the edit template of the grid? How would I be able to bind the dropdowns with the current record values?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 15 Jul 2010, 08:04 AM
Hello fred,

Yes, this scenario can be implemented by using RadGrid's FormTemplate feature:

<telerik:RadGrid ID="RadGrid1" runat="server">
    <MasterTableView>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%-- Define your combos here--%>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

Once you define your custom edit form template, you can use the ItemDataBound event to find and bind your cascading combos:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
        GridEditFormItem editForm = (GridEditFormItem)e.Item;
        //use editForm.FindControl() to find your combos and bind here
    }
}


Best,
Veli
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
0
fred williams
Top achievements
Rank 1
answered on 23 Jul 2010, 02:11 PM
Hello Veli and thanks for your response:

I know how to find the dropdowns using findcontrol, but how do I bind them once I find them?
0
Iana Tsolova
Telerik team
answered on 28 Jul 2010, 02:24 PM
Hi fred,

Please find the below online resources for more information on how to bind the RadComboBox control:

http://www.telerik.com/help/aspnet-ajax/grdoperationswithdropdownlistinedititemtemplate.html
http://www.telerik.com/help/aspnet-ajax/combo_databindingoverview.html

I hope this helps.

Greetings,
Iana
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
fred williams
Top achievements
Rank 1
Answers by
Veli
Telerik team
fred williams
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or