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

How to get comboBox id which was placed in RadGrid EditItemTemplate?

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Guruvu
Top achievements
Rank 1
Guruvu asked on 25 Nov 2010, 01:28 PM

Hi,

I need to retrive ComboBox id which was in RadGrid EditItemTemplate.

Here is my code:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
       if (e.Item is GridEditFormItem && e.Item.IsInEditMode)// if EditMode is EditForm or PopUp
       {
           GridEditFormItem editItem = (GridEditFormItem)e.Item;
           RadComboBox ddlCity = editItem.FindControl("gvddlPOWCity") as RadComboBox;
           string city = ddlCity.SelectedValue;
           . . . . . . . .
       }
   }


I am set the property in MasterTable view as below:

<MasterTableView DataKeyNames="POWId" EditMode="EditForms">

Eventhough I am getting e.Item.IsInEditMode is always false.

Is there any more modifications need to perform.Please tell me...

Thanks...

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Nov 2010, 02:34 PM
Hi Guruvu,

I reviewed the code, and it looks correct. At this point, if the issue persists, please open a formal support ticket, where you can attach files, and send us a small working project, which demonstrates your logic, as well as the unwanted behavior. I will debug it locally, and get back to you with additional information.

Meanwhile you can review following documents for more information about how to access items in RadGrid:
Accessing cells and rows
Edit forms

Best wishes,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Guruvu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or