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

Unbound GridViewDataColumn with bound GridViewDataColumn

4 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Syed Saqib Ali
Top achievements
Rank 1
Syed Saqib Ali asked on 27 Feb 2013, 11:13 AM
Hi,
This is my first encounter with Telerik Grid, and i am facing a seemingly simple problem. I have a bound Grid, and I add some GridViewDataColumn which are unbound. Using GridViewDataColumn has it's reasons, as i need to have the option of filtering, grouping and sorting with these.
I am trying to fill these columns in RowLoaded event, as it seems suitable due to row virtualization, but e.Row only offers bound cells. My 3 unbound columns are not accessible.

For each row I also need access to the data item, the row is bound to, because using this I fill these columns.

Is this or similar thing is possible in telerik wpf RadGridView ?                        version 2012, Q2

Exclude the wrapper based or ViewModel based solutions, those are not possible.
Thanks and regards

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Feb 2013, 01:51 PM
Hello,

Since the virtualization of RadGridView is turned on by default, it is not recommended to work with the visual elements and their properties. I would recommend you to work with the data elements instead. You can take a look at this article for a reference on UI Virtualization. 

Why don't you set the DataMemberBinding for the columns?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Syed Saqib Ali
Top achievements
Rank 1
answered on 27 Feb 2013, 02:42 PM
Because the properties don't exist. I am trying these two solutions in parallel, one by implementing
IDynamicMetaObjectProvider
, and the other using mix of these two. I use the same property store configured for holding dynamic properties.

IDynamicMetaObjectProvider solution works like charm but in our application it has a few caveats, which i am looking into. But since task is getting delayed so i thought of using mix of bound and unbound columns.
0
Dimitrina
Telerik team
answered on 27 Feb 2013, 02:51 PM
Hello,

You could check the "Various Data Sources" WPF Demo which shows different approaches.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Syed Saqib Ali
Top achievements
Rank 1
answered on 27 Feb 2013, 04:10 PM
So in short, i cannot mix both in the same grid :(
I have tried some demos, but unbound mode is addressed totally differently, and find no such sample where mixed mode is addressed. If i am missing that, please let me know.

Thanks you so much for the help and regards
Tags
GridView
Asked by
Syed Saqib Ali
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Syed Saqib Ali
Top achievements
Rank 1
Share this question
or