|
-
Jul 28th, 2003, 11:01 AM
#1
Thread Starter
Hyperactive Member
DataGrid Selection
Hi,
In a listview you can change the property of "fullrowselect" to true or false, is there a way to do this within a datagrid???
What I would like to do (after being able to do a "full row select" thingy if possible) would be to when I doubleclick on a row I could throw up a messagebox specifying one of the values out of that row.
But I keep seeing a lot of info about datagridstyles, do I really need to use them before I can 1) find out which column I am in, 2) Set the text in a column to bold???
Cheers,
Matt
-
Jul 29th, 2003, 03:54 PM
#2
Hyperactive Member
okay a couple of pointers.
remember datagrids only reflect the underlying data and it is not the datagrid that dictates the display it is the dataset.
In your particular example you want to select all rows.
here is some example code:
Dr1 and Ds1 already declared
dim rowno as integer = 0
For Each Dr1 In ds1.Tables.Item("mydata").Rows
DataGrid1.select(rowno)
rowno = rowno + 1
Next
this will highlight the rows and then of course you can run through the dataset again to determine whether the IsSelected property is true or false and take the required action.
-
Jul 30th, 2003, 03:07 AM
#3
Thread Starter
Hyperactive Member
Thanks for you assistance.
Tried it and it works.
Thanks!!
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
|