Hi,
How can i generate the columns dynamically in XamGrid using the collection in the ViewModel ?
<XamGrid Columns={Binding MyColumns} /> does not work.
Let me know if there is a work around for this.
Thanks
Raghu
Hi Raghu,
You can't bind to the Columns collection of the xamGrid, its a readonly property. You can have AutoGenerateColumns set to true and the xamGrid will automatically generate columns for your underlying data object. And, we support the AutoGenerateAttribute in the MS DataAnnotations assembly, so you can add that attribute to properties you don't want to have columns for.
[System.ComponentModel.DataAnnotations.Display(AutoGenerateField=false)]public string FirstName{get;set;}
-SteveZ