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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Insert Row to DataGrid

Thread ID:




4471 May 14,2003 07:13 PM UTC WinForms 0
Tags: FAQ
Jawed Hadi
Asked On May 14, 2003 07:13 PM UTC

Hi I have two questions (problems) 1. I am using the following code to add a new Row. It does add a new row to my Datagrid and it lets me add data to it, when I move to the next row it deletes all the data from this new row and moves the blank row one down and replaces it with the older row. Then it does not accept any data when you write into the cells of this row. Maybe I need to add some extra line of code to this. Can some help please? Thanks Dim dr as Datarow Dim dt as New Datatable() = mydataSet.tables(0) dr = dt.NewRow If myGrid.IsSelected(myGrid.CurrentRowIndex) Then dt.Rows.InsertAt((dr, myGrid.CurrentRowIndex) dt.AcceptChages() Else msgBox("Select a row first") End If 2. If I close my data Grid Window how can I know whether my Data Grid was Modified? Thanks for taking the time to help


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