By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

VB 2005 Row index in datagridview <> row index in dataset

P: n/a
Hello
i have this problem:

In a DataGridView the user work with data from a DataSet. on Start the row
index from datagridview is the same as the row index from the dataset.

Also:

DataGridView.Rows(5) <=====> DataSet.Rows(5) .

if the user delete a row (without update), or the user sort the datagridview
the index in the datagridview change but not the index in the dataset.

do you can help me to find the dataset index from the datagridview index?

my Example:

Private Sub KRKostenArtikelgruppenDataGridView_RowLeave(ByVal sender As
Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles
KRKostenArtikelgruppenDataGridView.RowLeave
If Me.Validate Then
Me.KRKostenArtikelgruppenBindingSource.EndEdit()

If Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowInde x).RowState
= Data.DataRowState.Added Or
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowInde x).RowState =
Data.DataRowState.Modified Then
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowInde x).Item("GebuchtDatum")
= Now()
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowInde x).Item("GebuchtPerson")
= PersonenNummer
End If

End If
End Sub

This example don't work correct with sorted datagridview or after delete a
row.

Sorry for my english ;-) and thank you for our support!

Robert Koller
Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hi Robert,

Since VS.NET 2005(Whidbey) has not been released, so far for Whidbey issue,
we have a definitely newsgroup about Whidbey.
microsoft.beta.whidbey.*

Thanks for your understanding!
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #2

P: n/a
Hi Peter

Thank you for your response.

Unfortunatly i can't fin this newsgroup
Since VS.NET 2005(Whidbey) has not been released, so far for Whidbey
issue,
we have a definitely newsgroup about Whidbey.
microsoft.beta.whidbey.*


You are sure?

Thank you verry match.

Robert
Nov 21 '05 #3

P: n/a
Robert,

I could not find them either, I assume that they exist still as internal
Microsoft newsgroups.

However this is a link to the 2005 vb forum in advance that Peter answers,
although it is possible that he is still up.

http://forums.microsoft.com/msdn/Sho...spx?ForumID=32

I hope this helps a little bit?

Cor
Nov 21 '05 #4

P: n/a
"Robert Koller" <he******@nospam.nospam> schrieb:
Unfortunatly i can't fin this newsgroup


These groups have been closed and (sadly) replaced by the forums
(<URL:http://lab.msdn.microsoft.com/vs2005/community/forums/>).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

P: n/a
Thank you, i have found it too.
Nov 21 '05 #6

P: n/a
Thank you, Cor
Nov 21 '05 #7

P: n/a
Hi

I am sorry for my mistake, I did not notice that has been closed.
And thanks for Herfried's correction, so far you can post to the link as
Herfried suggest.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.