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

Data bound grid - add new row

I am trying to add a new row to the data grid programmatically, but I keep getting the error: "Object reference not set to an instance of an object." I have tried using: grid[1,1].Text = "something"; and grid.CurrentCell.MoveTo(1,1); grid.CurrentCell.Renderer.ControlText = "xxx"; In the help I found the GridRowCollection, but I couldn''t find any examples on how to use it. I''m not sure where else to look. Any ideas?

2 Replies

AD Administrator Syncfusion Team December 11, 2003 04:56 PM UTC

Before calling grid[1,1].Text = "XYX"; try calling this.grid.Binder.AddNew();

CR Christina Rancilio December 11, 2003 05:34 PM UTC

That does the trick - Thanks!

Live Chat Icon For mobile
Up arrow icon