Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1192
Dynamic byding with differrent Data Source
posted

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.

  • 21382
    posted

    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.