Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
950
Get rid of focus from ActiveCell and SelectedCell
posted

Hi,

I want to get rid of focus from ActiveCell and Selected cells  in UltraGrid on clicking other controls of the form.

I am loading data using binding datasource .

I  am using diffent back color for ActiveCell and Selected Cell.

When initially loaded I am not seeing any Activerow because I am using the following code.

grid.SyncWithCurrencyManager = false;
grid.ActiveCell = null;

But once I select a cell I am not able to get rid of that focus from the cell.

I am able to clear the the selected cells bit still focus on active cell(i dont know wheather it is

really active cell because when I tried the following I got Active cell as null)

grid.Selected.Cells.Clear();
grid.ActiveCell.Appearance.BackColor = "Yellow";(this line didnt work bcause ActiveCell is null).

then I tried

grid.Selected.Cells.Clear();
grid.ActiveCell = null;

no result.


how can I clear the focus and also color form that Cell.