I have a situation where i would want to give user ablity to add new row to the Grid but once the row is added to the grid, the user should only be able to modifiy/update a single column. Rest all the columns should remain read-only or disabled.
I tried almost everything using the AllowUpdate property of the grid and bands and also the CellActivation property for the columns but all in vein.
Please help me the same.
Hi,
I'm not clear on exactly what you want to do. Can the user edit the same column in every row? Or only in new rows?
How are you adding the new rows? Are you using TemplateAddRows or the AddNew buttons?
Hi Mike,
i will give you a brief idea about what really the requirement is.
All the data entry is happening through the grid using the TemplateAddRows and the grid is bound to a datatable of the typed dataset as its datasource . The requirement is that the columns that constitute the unique key in the datatable should not be editable once the row is added to the grid. But at the time of adding the new row all the columns should be editable (including the unique key columns). Any other column (apart from the Unique key columns) should be editable is all the rows, either the existing row in the grid or the new rows.
if my understanding is correct then wingrid follows 2 step process to add a new row to the grid as follows:-
1. Insert a blank new row to the grid.
2. Update the data entered by the user in the newly inserted blank row.
i am not able to identify in which event should i write the code to make the cells or the columns as readonly or else if there is another way to implement this requirement.