Help with using one grid to switch between two different data sources!
I made an app that displays data in a data grid from local xml files. What I want to do is be able to select another data source from a drop down box that will display in the same grid, but not at the same time. The second source is coming from a remote server. Basically, right now i have two separate apps that i want to combine into one app. I have code for both but now i am having trouble combining the two. Let me know if you have any suggestions. Also let me know if seeing source code will help. Thanks
Manikavelu VelayuthamPosted Dec 4, 2010, 12:37 AM
If its a autogenerated columns, no issues.
If the grid has no autogenerated columns, data item in the grid should match with the two data sources.
On button click event, you can bind the second data source to that grid.
hope you understood, let me know if you need further information
Bradley GeorgePosted Dec 3, 2010, 3:03 PM
Suthish NairPosted Dec 3, 2010, 12:21 PM
Welcome to C# Corner..
Please provide more information about data structure, same grid etc. If same you can do as per Mani saie.
Manikavelu VelayuthamPosted Dec 3, 2010, 12:28 AM
If so both the data source should have same columns.
DataTable.Merge --> this method is used to merge the two data tables having the same schema.
let me know If my understanding is wrong.