How to display multi-valued fields in GridView

4 posts, 0 answers
  1. Rajani
    Rajani avatar
    14 posts
    Member since:
    Feb 2013

    Posted 20 Mar 2013 Link to this post

    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.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Mar 2013 Link to this post

    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.

  3. Rajani
    Rajani avatar
    14 posts
    Member since:
    Feb 2013

    Posted 21 Mar 2013 Link to this post

    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
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Mar 2013 Link to this post

    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.

Back to Top