This is a migrated thread and some comments may be shown as answers.

With previous data source I want to set new DataSource to grid

2 Answers 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shanti 😎
Top achievements
Rank 2
Veteran
Shanti 😎 asked on 13 Apr 2020, 06:56 AM

HI,

I have set the data source in my grid view. When I add the next data source, I want the new data source add, not the existing data source to be cleared.

Append with previous. it's possible?

waiting for your favorable response.

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 14 Apr 2020, 04:51 AM

Hello, Tovino,

RadGridView supports data binding to a single DataSource collection at a time. If the AutoGenerateColumns property is set to true, the columns will be generated from the data source.

Every next setting to a new DataSource collection will re-generate the columns according to the columns available in this new DataSource. Appending with the previous DataSource is not expected to be supported.

The possible solution that I can suggest is to append the DataSource programmatically and then apply it to the RadGridView.DataSource property, e.g. if you have DataTable1 and DataTable2 you can create a third DataTable which contains the columns from both DataTable objects and populate the rows considering the cells from both tables.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Shanti 😎
Top achievements
Rank 2
Veteran
answered on 15 Apr 2020, 04:19 AM
Thank you!
Tags
GridView
Asked by
Shanti 😎
Top achievements
Rank 2
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Shanti 😎
Top achievements
Rank 2
Veteran
Share this question
or