WorkSheet as DataSouce for RadGridView

2 posts, 0 answers
  1. Bruno
    Bruno avatar
    7 posts
    Member since:
    Sep 2017

    Posted 21 Dec 2017 Link to this post

    Is there a way to use a Worksheet "Or Convert it to" a dataSource that would be compatible with RadGridView?

    I'm currently working on building a list from the activeWorksheet but it cause multiple issues "Header name, Columns Type, ect..

     

    Thank you!

  2. Peshito
    Admin
    Peshito avatar
    550 posts

    Posted 25 Dec 2017 Link to this post

    Hello Bruno,

    RadGridView control is semantically different from the model of RadSpreadProcessing. RadGridView works by binding a collection of data to it and shows it in a table manner. Workbooks, on the other hand, are a whole structure and binding each cell would not be possible.

    That said, you could iterate over the contents of the workbook and create a collection applicable as the source of the RadGridView. RadGridView should recognize the column names as headers if they are properly set as column names in a DataTable. You could also take a look at the "Get, Set and Clear Cell Properties" and "Cell Value Types" articles for some additional information on the cell properties and cell value types.

    Hope this helps.

    Regards,
    Peshito
    Progress Telerik

Back to Top