|
-
Jun 14th, 2004, 04:23 PM
#1
Thread Starter
Fanatic Member
Another datagrid question <SOLVED>
I have textboxes, and when I select a line of a datagrid, I want to fill the value of the textboxes with the indexes of the selected line. I use to have this working, but I made some changes, now its all messed up. Here's some code.
Private Sub dgRecs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgRecs.SelectedIndexChanged
txtRecId.Text = dgRecs.SelectedIndex.ToString(1)
When I select a line in the datagrid, instead of putting the value of the index (1), it puts the number 1, and 2 for index(2)
Frustrating! Thanks again guys!
Last edited by drpcken; Jun 15th, 2004 at 02:32 PM.
-
Jun 15th, 2004, 02:33 PM
#2
Thread Starter
Fanatic Member
Was using selectedindex.tostring(1)
should have used selectedindex.cell(1)
Works like a charm now
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
|