Click to See Complete Forum and Search --> : URGENT!!! Problem with DataGrid Control.


Spectre5000
September 17th, 2001, 02:09 PM
I have a question that I would like some help answering please. I have a datagrid control on my form, along with
and adodc control. The adodc control gets the records that I need, and the datagrid control is bound to the adodc
control. The datagrid control needs to be updatable, allow for delete and allow for insert. However, I need to display
columns in the datagrid that should not be editable. Is there a way that I can make only certain columns in the datagrid
control editable? Or, if that isn't possible, how would I detect which column a user is clicking on, and then determine
if that column is to be editable or not? The methods/properties I have seen don't state anything about the currently
selected column, only the lastcol selected. Can anyone help me out with this please?

michi
September 17th, 2001, 02:42 PM
Did you try the AllowUpdate property? From MSDN, it says 'You can also use the Column object properties to make individual columns of the DataGrid control read-only, but the AllowUpdate property setting takes precedence over the column settings (without changing the column settings).'



Regards,

Michi

MKSa
September 17th, 2001, 03:13 PM
Try enabling the Locked property of the columns you want to make readonly ex:

DataGrid1.Columns(2).Locked = true