Hi
Why, if I use
UltraGrid1.Focus()
the Grid does not receive the focus?
Thanks
Hi Danko, thanks for you interest, I had already found a way round to this.
The Grid is one that has enabled rows and some that are not enabled. But even if all the rows are not enabled, I still believe the Grid should be able to focus (even though it might not go in Edit Mode), so the user can scroll through with the arrows...
Anyway, thanks a lot.
Hello Mariela77,
I am still following your forum thread.
Please feel free to let us know if you have any other questions with this matter.
Actually if the row is disabled, it is not possible to get the focus, because the row object couldn't be activated.
If you would like to be disallow editing of some rows you could set the Activation of them like:
...'DesiredRow".Activation= Activation.ActivateOnly; or..."DesiredRow".Activation = Activation.NoEdit;
where the difference is that when the Activation is NoEdit, you couldn't perform operations like copy and paste, because the cells cannot be edited or selected.
If you have any other questions please feel feel to let us know.
Thanks, I now have more info.
I have a grid in which the user can insert lines by pressing Enter in the last column of the last line. In some cases, a line generates other lines that I make appear automatically, next to the first one, and are related to it but they are not enabled for the user to modify them.
When the user starts a new line, he has the option of using ESC to erase it and the focus should go the previous line. I have noted that when the previous line is one of these special ones that are not enabled, the Grid does not receive the focus but only when it is clicked... I think a line that is not enabled should receive the focus (even if it doesn't go in edit mode)...
Thanks again
I have tried and the UltraGrid got the focus correctly. Could you please let me know what you would expect to happen after calling UltraGrid.Focus()?
Please feel free to let us know if you have any other questions.