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

Adding dynamically columns and fill its in rows

3 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Guillaume
Top achievements
Rank 1
Guillaume asked on 30 May 2011, 10:17 AM
Hello,

In my project, i have a GridView which has fixed columns and, according to, collection of my objects, i have to add dynamically columns.
I can
 add dynamic columns but I can't access to each row and fill in the values ​​of each new column.

Each fixed column is binded to a property of my objects but dynamical columns are not binded because their properties doesn't exist in my objects.

So, how can i get each row of GridView ?

Regards,
Guillaume

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 30 May 2011, 11:48 AM
Hello Guillaume,

Generally, it is always recommended to work with the underlaying data item and set the values of the corresponding properties. Consequently, I would definitely suggest you to expose appropriate properties for the columns you want to add. If not and a value is set for a particular cell, it will be most probably lost during scrolling due to the grid's virtualization.
 

All the best,
Maya
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
Guillaume
Top achievements
Rank 1
answered on 30 May 2011, 01:13 PM
Thanks, but how can i create kind of presentation object if i don't event know number and name of dynamic properties ?
0
Maya
Telerik team
answered on 30 May 2011, 03:45 PM
Hello Guillaume,

Yet another possible solution would be to benefit from the DataTable for Silverlight as illustrated in this blog post

Kind regards,
Maya
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
Guillaume
Top achievements
Rank 1
Answers by
Maya
Telerik team
Guillaume
Top achievements
Rank 1
Share this question
or