TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Martina Long
NA
1
0
DataGridView deleting first row
Feb 15 2007 7:12 PM
I have this routine that runs when the use clicks delete on a dgv row, but it keeps deleting the first row in the dgv no matter which row i have selected;
private void dgvDelays_UserDeletedRow(object sender, DataGridViewRowEventArgs e)
{
DataRowView selectedRow2 = (DataRowView)bindingDataDelays.Current;
if (selectedRow2 == null)
{
return;
}
_delayID = Convert.ToInt32(selectedRow2["DelayID"]);
DataRow[] currentRows2 = DataComponents.ShiftData.tblUnitDelays
.Select("DelayID = " + _delayID);
foreach (ShiftDataSet.tblUnitDelaysRow row in currentRows2)
{
row.Delete();
}
UpdateDelay();
}
Reply
Answers (
0
)
VB.NET and SQL Server Connection
Windows Service and IIS SMTP server issues