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

3 posts, 1 answers
  1. Shanti 😎
    Shanti 😎 avatar
    27 posts
    Member since:
    Jun 2016

    Posted 13 Apr Link to this post

    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. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3900 posts

    Posted 13 Apr Link to this post

    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.
  3. Shanti 😎
    Shanti 😎 avatar
    27 posts
    Member since:
    Jun 2016

    Posted 14 Apr in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thank you!
Back to Top