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

WorkSheet as DataSouce for RadGridView

1 Answer 83 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Bruno
Top achievements
Rank 1
Bruno asked on 21 Dec 2017, 12:27 PM

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!

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 25 Dec 2017, 09:25 AM
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

Tags
SpreadProcessing
Asked by
Bruno
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or