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.
There is a knowledge base article here that describes how to remove the focus rectangle.
Thanks for th link. I still not able clear the focus. I did like below.
private
void btnClearAll_Click(object sender, EventArgs e){
grid.DrawFilter = noFocus;
grid.Refresh();
}
I'm I missing anything or shall I set any other properties?
Thanks
The code you have here will remove the focus rectangle from the grid. This is the dotted rectangle that appears around the active cell or row. This focus rectangle will not display when the grid control does not have focus, anyway, so that's probably not what you are asking about. It sounds like maybe you are talking about the appearances that are applied to the active cell and active row.
If so, then this should help:
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
There are loads of reference posts like this which we can no longer access. Are they lost forever, or is it just the redirects that have broken?