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

diferent (dynamic?) templates for a GridView

3 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 16 Jun 2010, 05:49 AM
Good day!
I want to make a form - a set of questions with different answer types:
some questions have a number of answers and you can check one of the answers using radiobutton, other questions you should answer using a textbox, some answers have a datetime type and you choose answer for them using a DatePicker and so on.
I get all information about the questions and answer types from a WCF service.

I want to make this form using GridView with trmplates but my GridView would have some templates for the same column (answer column) in this form. How can I make it? Or maybe you have any other ideas about how to make this form?
Thank you.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Jun 2010, 06:06 AM
Hello,

You can check this demo.

All the best,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
lina fetisova
Top achievements
Rank 1
answered on 16 Jun 2010, 06:31 AM
Vlad thank you, but is there any documentation about DataTemplateRules? I don't exactly anderstand how this xaml works, sorry.
=)
0
Vlad
Telerik team
answered on 16 Jun 2010, 06:41 AM
Hello,

 The idea is to set CellTemplateSelector for desired grid column and return desired DataTemplate conditionally. Our DataTemplateSelectors are similar to WPF DataTemplateSelectors and you can check this MSDN article for more info. 

Greetings,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
lina fetisova
Top achievements
Rank 1
Answers by
Vlad
Telerik team
lina fetisova
Top achievements
Rank 1
Share this question
or