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

[Solved] How can i add a combo box on item template of RadGrid

2 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sumit
Top achievements
Rank 1
Sumit asked on 23 Mar 2013, 01:04 PM
This is not a feedback but somewhere i read i can post my issue here,
please fwd it , if this is not the right place



Issue: I have scenario where i have tp show the delete/Edit option in a menu.

Approach: so i was adding  dropdown in the Item Template, but i am not able to get the event of it at code behind, then i try button also same thing happens. Can you please help how to do it.


Thanks,
Sumit Kanchan
kanchan_s@hcl.com

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 26 Mar 2013, 02:11 PM
Hi,

I am not sure that I understand correctly what your requirement is. Could you share your full page source code along with the code-behind file? Thus all the people who want to help you will have better understanding of your case.

Kind regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shinu
Top achievements
Rank 2
answered on 27 Mar 2013, 05:43 AM
Hi,

You can attach event in ItemCreated event as shown below.
C#:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox 1");
            combo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(combo_SelectedIndexChanged);
            combo.AutoPostBack = true;
      }
}
void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
 
    }

Thanks,
Shinu
Tags
Grid
Asked by
Sumit
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or