DevExpress Xtra Grid with lookup edit only active when checkbox true

508 views Asked by At

I am looking for a solution to my problem. I have a grid that displays data from the person model: string Name bool ILiveInEurope

The bool field is displayed with a checkbox in grid. I would like to add a lookup edit column with country selection.

Default country selection is to be unavailable. The option to select the country is to be available only if someone selects the true checkbox.

Of course, if someone selects the checkbox false - lookup edit is to be unavailable and the country set is to be removed.

Can you help me how to do it?

1

There are 1 answers

0
DmitryG On

You can use the ColumnView.ShowingEditor event which occurs when a cell in-place editor is about to open, - you can check some conditions and prevent editor showing.
Related online video: WinForms Grid: Prevent Editing in Specific Cells.