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

How to add data from a list to a column?

Hello. I am newbie. Can you please tell me how can I fill the column with data from the collection?

If I use a sf:DataGridTemplateColum I get an error 

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Can someone share an example of how to add data from a collection to a column

Thanks everyone

3 Replies

KK Karthikraja Kalaimani Syncfusion Team March 3, 2023 12:39 PM UTC

Hi Alex,

We created a simple Sfdatagrid using the provided code snippets, but we didn't encounter any exception. Here is a sample that we used to replicate the reported scenario on our end. Could you please share the exception stacktrace details as well as code snippets for the SfDataGrid control? It will be more helpful for us to provide a timely solution. 


Karthik Raja

Attachment: SfDataGridDemo_5e0ab292.zip

OC Oct March 13, 2023 01:42 PM UTC

Hi, Karthik. Thanks a lot

KK Karthikraja Kalaimani Syncfusion Team March 14, 2023 05:30 AM UTC

We are glad that your requirement has been met on your side. Please let us know if you need further assistance. As always, we are happy to help you out. 

Live Chat Icon For mobile
Up arrow icon