I have a WebDataGrid with the following columns: Service_Date and ApprovedIf in a record, the Approved field = 1, I don't want the user to be able to edit the Service_Date cell for that record...but only for that record. If in another record, the Approved field = 0, then I want the user to be able to edit the Service_Date cell for that record.In UltraWebGrid, it was so easy...I could simply do the following in the InitializeRow code: If e.Row.Cells.FromKey("Approved_Flag").Value = 1 Then 'checked e.Row.Cells.FromKey("Service_Date").AllowEditing = Infragistics.WebUI.UltraWebGrid.AllowEditing.No End IfCan you please give a specific example of how to do this?
Hi algunderson,
A possible approach would be to cancel EnteringEditMode client-side event for rows where Approved_Flag equals 1:
function EnteringEditModeHandler(sender, eventArgs) { var currentRow = eventArgs.getCell().get_row(); var approved = currentRow.get_cellByColumnKey("Approved_Flag").get_value(); if (approved == 1) { eventArgs.set_cancel(true); }}
If you have any questions, please let me know.
I'm following up to see if you have resolved your issue.