all groups > vb.net > may 2005 >
You're in the

vb.net

group:

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


VB 2005 Row index in datagridview <> row index in dataset Robert Koller
5/31/2005 11:18:57 PM
vb.net:
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.RowIndex).RowState
= Data.DataRowState.Added Or
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowIndex).RowState =
Data.DataRowState.Modified Then
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowIndex).Item("GebuchtDatum")
= Now()
Me.KenusDBDS.KRKostenArtikelgruppen.Rows(e.RowIndex).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

RE: VB 2005 Row index in datagridview <> row index in dataset v-phuang NO[at]SPAM online.microsoft.com (
6/1/2005 12:00:00 AM
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.
Re: VB 2005 Row index in datagridview <> row index in dataset Robert Koller
6/1/2005 12:00:00 AM
Hi Peter

Thank you for your response.

Unfortunatly i can't fin this newsgroup

[quoted text, click to view]

You are sure?

Thank you verry match.

Robert

Re: VB 2005 Row index in datagridview <> row index in dataset Robert Koller
6/1/2005 12:00:00 AM
Thank you, i have found it too.

Re: VB 2005 Row index in datagridview <> row index in dataset Robert Koller
6/1/2005 12:00:00 AM
Thank you, Cor

Re: VB 2005 Row index in datagridview <> row index in dataset Cor Ligthert
6/1/2005 8:54:18 AM
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/ShowForum.aspx?ForumID=32

I hope this helps a little bit?

Cor

Re: VB 2005 Row index in datagridview <> row index in dataset Herfried K. Wagner [MVP]
6/1/2005 11:53:27 AM
"Robert Koller" <heshbreg@nospam.nospam> schrieb:
[quoted text, click to view]

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/>
Re: VB 2005 Row index in datagridview <> row index in dataset v-phuang NO[at]SPAM online.microsoft.com (
6/2/2005 12:00:00 AM
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.
AddThis Social Bookmark Button