|
-
February 27th, 2003, 02:35 PM
#1
CurrentRowIndex in DataGrid don't return the right value
I have a DataGrid assiciated with a DataSet.
When the user select a row and click on button, a dialog
appear for allow to modify this row.
If I change some information and click on "Accept change" button, I update the dataset and return to the parent form. After the "child form" is closed I update the DataGrid with the new informations.
But after this CurrentRowIndex return always 0.
Anyone have an idea how to solve this problem ?
Martin Bonneville
Développeur logiciel
Québec, Canada
-
February 28th, 2003, 04:10 PM
#2
I found a solution. It's not a great solution but it work.
Before updating my DataGrid I do this :
Dim CurCell As DataGridCell
CurCell = DataGridListe.CurrentCell()
After updating :
DataGridListe.CurrentRowIndex = CurCell.RowNumber
Now when the user select a row, DataGridListe.CurrentRowIndex return the right value !!!
VB strike again (you don't know why it's working, but it's working) :-)
Martin Bonneville
Développeur logiciel
Québec, Canada
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|