I have change the focused row backcolor in design time,and it works fine when I click a data row,but when I changed the focused row via FocusedRowHandle Property,the backcolor not work. How can I do it?
Changing FocusedRowHandle does not change the appearence of row
Answers approved by DevExpress Support
Hi Young,
The GridView.Appearance.FocusedRow.BackColor property is designed to specify the background color of a focused row. I recommend that you use it to achieve the goal.
Would you please explain what you mean by 'when I changed the focused row via FocusedRowHandle Property' ? How do you change the focused row back color?
I recommend that you review the following article for more information about the grid appearance:
Appearances Overview
I'm looking forward to your reply.
Other Answers
I have been annoyed by this problem for weeks, NO one give directly right answer. but Jannet's solution inspired me. I tried the code blow, thanks god, it works.
C#gridView1.FocusedRowHandle = rowHandle; gridView1.Focus();
I guess when you set the FocusedRowHandle property in code, the view lost it's focus, so you must focus it again by code.
也许是因为gridView1的失去焦点造成的,在代码里重新focus就可以正常了。
Hi Young,
From what I gather, you are talking about XtraGridControl rather than Coded UI. I've changed the 'Product' section in this ticket to reflect this.