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

Different DataTypes in one Templatecolumn

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tobias
Top achievements
Rank 1
Tobias asked on 16 May 2011, 02:41 PM
Hi there,

I have to handel different Datatypes in one Templatecolumn. For this I have to load dynamic different controls to provide a proper interface for the user.
I attached a picture to this post.

As you can see, the column "typ" represents different kinds of datatypes. If the user presses the editbutton, the control in the colum "Wert" has to represent a proper control. For the date-type I need the "raddatepicker" and for the integer a RadNumericTextBox and so on.

Anybody an idea to solve this problem?

Best regards.

2 Answers, 1 is accepted

Sort by
0
Tobias
Top achievements
Rank 1
answered on 18 May 2011, 07:12 AM
Nobody with an idea?
0
Accepted
Vasil
Telerik team
answered on 19 May 2011, 11:13 AM
Hi Tobias,

You could dynamically add different control into the edit item when handling ItemCreated event of the grid. Or you could add all possible controls to the edit template and then on ItemDataBound hide these that are not used.
You will find some helpful information in the resources bellow:
Referencing controls in grid row/edit form
Accessing cells and rows

Greetings,
Vasil
the Telerik team

Browse the vast support resources we have to jump start 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
Tobias
Top achievements
Rank 1
Answers by
Tobias
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or