|
-
Dec 6th, 2002, 02:27 AM
#1
Thread Starter
Hyperactive Member
DataGrid
Assuming this is my DataGrid and its record.
===========================
|StudNo | StudName |
===========================
|001 | MeeJee Joi |
------------------------------------------------
|002 | Gou Li |
------------------------------------------------
|003 | William Ho |
------------------------------------------------
I tried: MessageBox.Show(DataGrid1.Columns(0).Text), but this code doesn't work.
Please help me, I want to show the StudNo 001 using MessageBox!
-
Dec 6th, 2002, 02:49 AM
#2
Get the data from the datasource not directly from the datagrid. The datagrid really only shows the data that it is bound to, but the actual data is still mainly in the source.
-
Dec 6th, 2002, 03:34 AM
#3
Registered User
I agree with Edneeis, but if you still want to get the item from the grid you might try
MessageBox.Show(DataGrid1.Item(0, 0))
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
|