We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

I want to dynamically add columns to SFGrid and all rows that returns from database.

I have created a template SfGrid (SimpleDataGrid).

Then after that in Fetchdata.razor I am setting columns using a loop. However I am not able bring data from employee class.


2 Replies 1 reply marked as answer

HN Hunain Nasir March 22, 2023 05:58 AM UTC

Hi,


I was able to make changes and make data grid of one type to work in FetchData.razor.


However, I still want to make it work for other datagrids in TestDataGrid_Dynamic.razor and DataGrid.razor.


Currently they are working without dynamic binding as in FetchData.razor. Please can you modify the files in the project and make them dynamic binding and use Employee List data because I am not sure how to use employee list data instead of datatable a


Attachment: Test_app_80234dd3.zip


SP Sarveswaran Palani Syncfusion Team March 29, 2023 03:44 AM UTC

Hi Hunain,

Sorry for the delay and inconvenience caused.

From your query, we modified sample based on your requirement. We have attached sample for your reference. If you have any further queries, please get back to us.

Regards,
Sarvesh


Attachment: Testing1_(2)_4f17d7c9.zip

Marked as answer
Loader.
Up arrow icon