| | |
Problem with row that adds new rows in DataGridView
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Sep 2008
Posts: 24
Reputation:
Solved Threads: 0
Hey professionals, I use DataGridView that allows me to add new rows in table. But when I want to delete it by clicking on my deleting button with following code:
DataGridView.Rows.RemoveAt(DataGridView.CurrentCell.RowIndex);
...it makes problems, others rows aren't problematic to delete but this is. But not on purpose I want to delete this row for adding new rows of the table, but only to prevent some coincidental clicking on the button.
...this table of DataGridView is filled by Dataset which is filled by xml file.
DataGridView.Rows.RemoveAt(DataGridView.CurrentCell.RowIndex);
...it makes problems, others rows aren't problematic to delete but this is. But not on purpose I want to delete this row for adding new rows of the table, but only to prevent some coincidental clicking on the button.
...this table of DataGridView is filled by Dataset which is filled by xml file.
•
•
Join Date: Jun 2008
Posts: 58
Reputation:
Solved Threads: 9
if you are talking about the default blank row at the bottom of all the rows then you have to turn off the property AllowUserToAddRows.
Since it is not a real row you cannot delete it.
Since it is not a real row you cannot delete it.
Visual C# Kicks - Free C# code resources and articles.
![]() |
Other Threads in the C# Forum
- Previous Thread: Resetting the column type of a datagridview
- Next Thread: Deleting of the last row in DataGridView
| Thread Tools | Search this Thread |
.net 7 access ado.net algorithm app application array barchart bitmap box broadcast buttons c# cast check checkbox client color combo combobox concurrency control conversion csharp custom database datagrid datagridview dataset datatable datetime degrees development draganddrop drawing enabled encryption enum event excel file form format forms function gdi+ httpwebrequest image index input install java label list listbox localization mandelbrot math microsoftc#visualexpress mono mouseclick mysql operator path photoshop picturebox pixelinversion post problem programming radians regex remote remoting richtextbox serialization server sleep socket sql sql-server statistics stream string table text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf xml





