Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
781
ConditionalFormat other Column
posted

Hi,

in my xamGrid i have a templatecolumn with a checkbox in it and a textcolumn. The textcolumn should be editable the whole time until the checkbox is checked. If the checkbox is not checked the textcolumn should return to edit mode.

How can i achieve this?

Thanks in advance

 

Parents
  • 6475
    posted

    Hi,

    I'm not exactly sure what you're trying to achieve. If I understand you correctly, you might try checking the value of the checkbox in CellExitingEditMode event and cancel the operation if the checkbox is not checked. Assuming your TemplateColumn is bound to a boolean property in your data object, the code should look something like this:

    private void igGrid_CellExitingEditMode(object sender, ExitEditingCellEventArgs e)

    if (e.Cell.Column.Key == "MyTextColumnKey") 

    {

    e.Cancel = !((MyDataObject)e.Cell.Row.Data).MyBoolProperty;   

    }

    }

    Hope that helps,

Reply Children