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

[Solved] User controls in radgrid

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sridhar
Top achievements
Rank 1
Sridhar asked on 19 Jun 2008, 09:31 PM
Hi,

I have few custom ascx dropdown which I need to include as a column. I have populated the dropdown in the Load event of the control. I have used EditItemTemplate to add these controls to the columns.

The problem is that after I select a value from dropdown and click Update, it posts back the page and the radgrid gets created from scratch (As I am using dynamic creation of grid). The template is again fired and the controls are newly created. This erases the value from the dropdown.

Is this the right approach to add custom controls in grid or else I can use ItemDataBound event to create the controls?

Sridhar

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 20 Jun 2008, 03:27 PM
Hi Sridhar,

Exactly, you need to use ItemDataBound to reference your controls by ID and populate their data. This way, you make sure the control data is present when you need it.

Best wishes,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Sridhar
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or