Click here to Skip to main content
16,020,714 members

Comments by jainga10213 (Top 4 by date)

jainga10213 31-Jan-14 13:52pm View    
Hi Abinav,
Each of my property within the class has a corresponding boolean property that decides whether it is visible or not. I will try to explore this approach further. One question,is there a way to export the formatting also through this approach?
jainga10213 31-Jan-14 13:49pm View    
Hi Kenneth,
Thanks for your reply. I am new to VisualTreeHelper. Is there a good resource where I can find some working examples for the same?
Will this approach also export the entire datagrid or just the portion of it that is visible (some of it may not be visible due to horizontal scrolling)?
jainga10213 28-Jan-14 15:20pm View    
Thank you Sergey for your suggestions. I Have decided to go with the initial approach that is also easy for me to comprehend and implement. I am now defining all the possible columns that the grid can have and then hide the unwanted columns based on some criteria.
jainga10213 21-Jan-14 14:43pm View    
Hello Sergey,
Thanks for your comments and detailed reply.

Actually, what I was looking for is to be able to bind an arbitrary complex class to a datagrid. That would mean I cannot create columns in XAML in advance as I have a lot of such complex classes with many nested properties. I wanted to avoid the tedious job of creating and maintaining such XAML files. Instead, what I want is a generic method that could recursively look for properties within nested classes and bind them to a datagrid. Of course my classes should implement INotifyPropertyChanged and the collection should be an observable collection. And with binding to datagrid if I change a value in the grid then it should trickle all the way down to the right class and right property (through the chain of nested classes).

BTW, Is there any document I can reference for naming convention in c#?