erbeen
erbeen

Reputation: 77

DevExpress Xtra Grid with lookup edit only active when checkbox true

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?

Upvotes: 0

Views: 563

Answers (1)

DmitryG
DmitryG

Reputation: 17848

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.

Upvotes: 0

Related Questions