Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 25th, 2007, 06:43 AM
Authorized User
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGridView - how to delete Row

Hi all,

I am working on C# project using C# 2.0. I have a DataGrid that contains 10 rows and at runtime I insert one more row at DataGridView.Insert(0,1); in my next step, I want to delete the row from DataGridView at DataGridView.RemoveAt(9) // Index 9 is the last row in the grid. But, I am not able to delete the row. I am getting following exception: System.InvalidOperationException:Uncommitted new row cannot be deleted. at System.Windows.Forms.DataGridViewRowCollection.Rem oveAt(Int32 index)

Please help if you know the solution.

Thanks in advance for your help.


Similar Threads
Thread Thread Starter Forum Replies Last Post
To delete and Accept a row in DataGrid vijay_83 ASP.NET 1.0 and 1.1 Basics 3 September 19th, 2006 02:15 PM
Accept and Delete a row in DataGrid vijay_83 ASP.NET 1.0 and 1.1 Basics 2 September 19th, 2006 12:15 PM
how delete row in datagrid which check checkbox ashish2001mca Forum and Wrox.com Feedback 1 September 18th, 2005 03:43 AM
Confirm delete row in datagrid rajanikrishna General .NET 3 December 8th, 2004 09:27 PM
how to delete a row when click delete hyperlink naveenkumarg1 Pro JSP 1 August 16th, 2004 01:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.