DataGrid

snufse
01-27-2004, 07:04 AM
I am using a Datagrid to display records from a table. I have 2 questions:

1. How do I set the rows to be read-only
2. How do I capture the current row (user clicked)

Thank you.

VBJoe
01-27-2004, 06:45 PM
1) I think if you bind the DataGrid to a Data Reader, then the data will be read-only(can't promise because I haven't tried it). Also, if you bind the DataGrid to a DataView, the DataView has .AllowDelete, .AllowNew, .AllowEdit properties.
2) Use the .CurrentRowIndex property of the DataGrid.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum