1 Reply Latest reply on Oct 16, 2007 5:08 AM by atta707

    DataGrid - make a column conditionally/dynamically read-only

    cmarkiewicz
      Hello. I have a DataGrid which includes a CheckBox and a number of editable in each row. If the CheckBox for a given row is checked, I want to make certain fields in that row non-editable. I've developed a scheme for doing this, but I don't know if it's the best approach. Essentially I catch the itemClick event on the DataGrid with a method that evaluates the CheckBox status, and if checked it evaluates the column index which the user is trying to edit. Based on my criteria, I either allow them to edit it, or I manually set the editedItemPosition attribute on the DataGrid.

      This seems like a hack to me. Can someone suggest a better approach for handling this?

      Thanks
      Chris