charlieb01
asked on
Configure a DataGrid for limited user access
Hi,
I have a datagrid that is bound to a datatable in code and I am using DataGridTableStyles to format the grid just the way I want it to look. I don't want the user to be able to add any new rows so I set the dagatgrid.ReadOnly property to TRUE. However, there is one column of rows that I do want the user to be able to change. In this case I was thinking the user could type a new number in a particular cell and then click on a button to store the changes back to the original database table.
So, is there any way to prevent the user from adding rows to a datagrid and keep the entire datagrid as Read-)nly except for one column?
Thanks,
Charlie
I have a datagrid that is bound to a datatable in code and I am using DataGridTableStyles to format the grid just the way I want it to look. I don't want the user to be able to add any new rows so I set the dagatgrid.ReadOnly property to TRUE. However, there is one column of rows that I do want the user to be able to change. In this case I was thinking the user could type a new number in a particular cell and then click on a button to store the changes back to the original database table.
So, is there any way to prevent the user from adding rows to a datagrid and keep the entire datagrid as Read-)nly except for one column?
Thanks,
Charlie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can set each individual column of the datatable as readonly.
ds.tables(0).Columns(0).re
ds.tables(0).Columns(1).re
ds.tables(0).Columns(2).re
'etc....
ds.tables(0).Columns(3).re
Hope that helps