Unbound rows - Error. Could be a bug?

I created a project with a form with only two controls.  sfDataGrid and a button.

Added two columns to the sfDataGrid.  In my button click event I have the following:

    Private Sub SfButton1_Click(sender As Object, e As EventArgs) Handles SfButton1.Click
        SfDataGrid1.UnboundRows.Add(New GridUnboundRow())
    End Sub

It creates the row, however if I click in any of the cells I get the following error:
System.NullReferenceException: 'Object reference not set to an instance of an object.'


Can you see if you can reproduce the issue?  If not, I can send you my application.

3 Replies

VS Vijayarasan Sivanandham Syncfusion Team April 8, 2020 12:53 PM UTC

Hi Jeff,

Thank you for contacting Syncfusion support.

We suspect that you didn’t set the DataSource for SfDataGrid. So only, when you click the cell in UnboundRow the exception raise. If So, please confirm else share the stack trace and replication procedure for the reported issue to proceed further.

Regards,
Vijayarasan S



JE Jeff April 8, 2020 03:33 PM UTC

That was the solution, thank you.


VS Vijayarasan Sivanandham Syncfusion Team April 9, 2020 06:48 AM UTC

Hi Jeff,

We are glad to know that the reported issue has been resolved. Please get back to us if you have any other queries. As always, we will happy to assist you
😊

Regards,
Vijayarasan S 


Loader.
Up arrow icon