View Single Post
Old 03-11-2006, 11:37 AM   #4 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
i found my answer. its a limitation of the datagrid
A row is selected only if the user clicks the column button associated with the Select command.
There is an architectural issue behind this limitation.
To process the selection event on the server, you need an interactive element on the page that, when clicked, posts back to the server.”

A selected row can have a custom style that you specify by using the SelectedItemStyle property;
Only one row in the DataGrid control can be selected at any time. Multiple selection is not supported.(aka - ListBox)
A row is selected only if the user clicks the column button associated with the Select command And you can get the info for all the cells (e.Item.Cells(0).text = e.Item.Cells(1).text etc)
Each select column must be created using the ButtonColumn class with the CommandName property set to select.
The user can select the row by clicking any of these columns and choose any color which will remain after post-back
rikb53 is offline   Reply With Quote