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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Data bound grid - add new row

Thread ID:





9258 Dec 11,2003 04:49 PM UTC Dec 11,2003 05:34 PM UTC WinForms 2
Tags: GridControl
Christina Rancilio
Asked On December 11, 2003 04:49 PM UTC

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?

Administrator [Syncfusion]
Replied On December 11, 2003 04:56 PM UTC

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

Christina Rancilio
Replied On December 11, 2003 05:34 PM UTC

That does the trick - Thanks!


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon