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
475
conditional editing
posted

I have a template column that has 3 values, when the value is "A", the cell should not be editable. If not, the cell should display the editor template which is a combobbox dropdown. How do I do this?

Thanks!

  • 960
    Verified Answer
    Offline posted

    Hello Erika Bumatay,

    I have investigated your issue that you need to implement conditional editing on a template column whose editor template is a combbox.

    As to how to use a combo box in an editor template, it is explained in the following online help document.
    https://es.infragistics.com/help/wpf/xamgrid-using-editing-events-to-create-a-custom-editor

    And regarding conditional editing, use CellEnteringEditMode event and cancel the event.

    private void xamGrid1_CellEnteringEditMode(object sender, Infragistics.Controls.Grids.BeginEditingCellEventArgs e)
    {
        if(e.Cell.Column.Key == "<column_key>")
        {
            if(e.Cell.Value.ToString() == "A")
            {
                e.Cancel = true;
            }
        }
    }


    I hope this will help you.


    Best Regards,

    Noriko I.
    Developer Support Engineer
    Infragistics, Inc.