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

GridView - Possible to have different control type for each cell?

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alan Lee
Top achievements
Rank 1
Alan Lee asked on 22 Dec 2009, 05:22 AM
I am working on a project where I need a different control type (date picker, combo box, textbox) for each cell on the same column.

Example:

Attributes Value
Name Textbox
DOB Date Picker
Origin Combo Box (List of Countries)

If it is possible, any sample code would be appreciated.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Dec 2009, 06:56 AM
Hello Alan Lee,

To achieve your goal you can inherit from desired grid column, override CreateCellElement and/or CreateCellEditElement and return desired control. You can check this blog post for more info:
http://blogs.telerik.com/nedyalkonikolov/posts/09-11-12/how_to_create_custom_editor_with_radgridview_for_silverlight_and_wpf.aspx

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Alan Lee
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or