|
-
Sep 28th, 2004, 07:48 AM
#1
Thread Starter
Addicted Member
datagrid
Hi,
I have a datagird in windows form, how I get the value from the column when user click then row.
For example, a datagrid contains the following column
productid,productname,productdesc
if a user clicks a row, it should return the productid of that row.
How could I do it?
Thanks,
Newbie
-
Sep 28th, 2004, 09:18 AM
#2
Thread Starter
Addicted Member
Could anyone please give me some examples for this.
Thanks,
Newbie
-
Sep 28th, 2004, 08:15 PM
#3
Re: datagrid
Originally posted by VB.NETNEWBIE
Hi,
I have a datagird in windows form, how I get the value from the column when user click then row.
For example, a datagrid contains the following column
productid,productname,productdesc
if a user clicks a row, it should return the productid of that row.
How could I do it?
Thanks,
Newbie
VB Code:
'lets assume that you have a datatable and you bind it to your datagrid and your datatable has 3 columns productid,productname,productdesc
'in the datagrid click event
datatable1.Rows(DataGrid1.CurrentCell.RowNumber)(0)---it gets the first column of your datatable (productid)
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
|