Solved

Delete dataGrid row bind to dataTable with Delete button

Posted on 2004-09-18
2
217 Views
Last Modified: 2008-02-26
Hi all,

I'm trying to delete a row through datagrids currentrowindex with a good old button.
Thing is I'm filling up the datagrid (dataset) with comboboxes and textboxes, yadayada...
Problem is when I delete the row using:

         dataTable1.Rows[dataGrid1.CurrentRowIndex].Delete();

In the dataTable it's not always the right one.
For instance if I sort the datagrid all goes bad. (This is disabled for the moment to be able to move on)

Is there a way to trigger the delete-row-event in the datagrid itself?
DataGrid is readonly though to remove the 'new' row!
Is the only way to insert a new column with a unique key?

Thanks,
Pierre
0
Comment
Question by:Targeted
2 Comments
 
LVL 5

Accepted Solution

by:
tomasX2 earned 125 total points
Comment Utility
0
 

Author Comment

by:Targeted
Comment Utility
Thanks tomasX2 for the fast answer...

This solved my problem.
Regards,
Pierre
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now