views:

14

answers:

1

Hi,

My requirement is rather a tricky one (it seems to me). I will explain the scenario.

I have a DataGrid. In the DataGrid, I have two columns in which I have a grid in every cell of these two columns, inside of which, there are two comboboxes - the purpose being to switch the visibility based on some conditions.

When we select a value in the combobox, the combobox itself, plus some other controls in some other columns will get disabled (requirement of the pjt). Now there is also, another requirement like, Tab should not be allowed in the cell which has disabled controls - say disabled combobox.

We are setting the controls as Enabled or Disabled based on a selected value from the combobox. So, since we are applying the disabling property on the control level, and the IsTabStop property is on the cell level, I am not able to restrict Tabbing in the cells having disabled control.

Any thoughts?

Thanks in advanced, Anish Kurian

A: 

Don't use a DataGrid.

DataGrid's are awesome for read-only stuff, but they seem to suck for doing any kind of interesting editing. After well over a week of fighting with it, I've given up on it.

Right now I'm looking for a replacement, which may end up just being a scrollable stack panel with manually added controls.

http://stackoverflow.com/questions/3843699/wpf-is-there-a-listbox-without-the-ability-to-select-items

Jonathan Allen