I have some grids where the user selects a code in the first column. Based on that code, I set some IsReadOnlyBinding MVVM properties to hide or display the rest of the columns. This works great if the next column is always editable. However, if the next column is sometimes read only and sometimes editable, I get odd results.
If I set the default value to editable and then set it to read only when I select the code, that column gets focus although it does not go into edit mode. I then have to tab again to get to my next editable field.
If I set the default value to hidden and then set it to editable when I select the code, that column gets skipped. I can tab back to it and it is editable but obviously that is not very user friendly to have to go back and forth.
I know that the keyboard command provider is executed before the property is committed so the next keyboard action is already figured before the grid knows whether the next column is going to be read only or editable. Is there a way to capture the focus on the cell and move it forward if the cell is read only programmatically? Or a way to refresh the keyboard commands after the properties are set? Any other ideas?
thanks!
If I set the default value to editable and then set it to read only when I select the code, that column gets focus although it does not go into edit mode. I then have to tab again to get to my next editable field.
If I set the default value to hidden and then set it to editable when I select the code, that column gets skipped. I can tab back to it and it is editable but obviously that is not very user friendly to have to go back and forth.
I know that the keyboard command provider is executed before the property is committed so the next keyboard action is already figured before the grid knows whether the next column is going to be read only or editable. Is there a way to capture the focus on the cell and move it forward if the cell is read only programmatically? Or a way to refresh the keyboard commands after the properties are set? Any other ideas?
thanks!