I have common user control having XamWebGrid. This control used to show/populate data from different Data sources having different set of data.
I try to use create column at run time. After user select second data source then it doesn't work Create Columns and gives run time error.
How can i bind at run time multiple data source with single data grid. I want to bind one data source at a time.
Suggest solution of above problem.
If AutoGenerateColumns is set to True, then switching the itemsource to the new item source should clear out any columns that weren't user generated
You can always set your set your itemsource to null, then call grid.Columns.Clear() and then set the new Itemsource.