Hi
Why, if I use
UltraGrid1.Focus()
the Grid does not receive the focus?
Thanks
Problem solved ... Reason was that grid has visibility = false during load so couldn´t be focused
Hello,
I have similar problem. Here is its description:
I have my own class which is child of UltraGrid and inside this class in event which triggers after data load in data structure I would like to focus first row. Problem is that when I reload data (using some button) it´s logical, that I lost focus on grid, but when I want to set focus inside UltraGrid using this.Focus() (inside this event) nothing happens. (Focus stays where was).
Anothir thing ... I have tried
this.PerformAction(UltraGridAction.FirstRowInGrid);this.Rows[0].Activate();this.Rows[0].Selected = true;
and it´s working, grid has actually selected first row, but don´t have focus and this is what I want.
Hello Mariela77,
I am glad that I was able to assist you here.
If you are having any other Infragistics related questions in the future please feel free to contact us.
Thank you so much, this is very helpful.
Thank you for your feedback.
I would like just to add to this one more thing. You could use the built in PerformAction method of the UltraGrid like:
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.BelowRow); or ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.AboveRow);You could use this method depends on the desired functionallity that you are looking for, so the focus will still remain inside the UltraGrid and doing so you will activate a row below or above the one that might be disabled. There are also other overloads of this method so please feel free to use the desired one that will suit the best in your current scenario.
If you have any other questions please feel free to contact us.