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

How to display multi-valued fields in GridView

3 Answers 210 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rajani
Top achievements
Rank 1
Rajani asked on 20 Mar 2013, 05:56 AM
Hello,

I'm using a radgridview and need to display a column that supports multiple values. For example I have a field "Supported Languages" that can take multiple values such as "English, Arabic, French" .. What type of datacolumn should I be  using to display this data? I tried using the ComboBoxColumn, however it requires separate bindings for the ItemsSource and DisplayMemberPath. I'm trying to avoid using concatenated strings. Please advise.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 21 Mar 2013, 01:38 PM
Hello,

You can predefine the CellTemplate of the column as explained in this help article. Then you can place any control/controls there to serve your needs.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rajani
Top achievements
Rank 1
answered on 21 Mar 2013, 04:27 PM
Thank you Didie. The article you sent helps. I have two related questions though:

1) Will applying a cell template affect performance if I'm expecting a huge data set of 50,000 records? I thought I read somewhere that its not recommended to apply cell templates.

2) Another related question is about grouping.. I had posted a question at http://www.telerik.com/community/forums/wpf/gridview/ability-to-group-on-column-with-comma-seperated-values.aspx. I want to be able to group my multi-valued column based on the values .. is that possible .. For example :

Id    Fruits     
1     Apple, Banana
2     Banana, Strawberry
3    Apple, Orange

Grouping on Fruits should display as below:

Fruits
    Apple
        1    Apple, Banana
        3    Apple, Orange
    Banana
        1    Apple, Banana
        2    Banana, Strawberry
    Orange
        3    Apple, Orange
    Strawberry
        2    Banana, Strawberry
0
Dimitrina
Telerik team
answered on 25 Mar 2013, 04:07 PM
Hello,

In general I would suggest you to go through the Degraded Performance and the Tips and Tricks help articles suggesting on how you could improve the performance.

I am afraid that the GridView does not support such custom grouping scenario. You need to have a property to be grouped on as explained in our
online documentation

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Rajani
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Rajani
Top achievements
Rank 1
Share this question
or