Ticket T192698
Visible to All Users

Changing FocusedRowHandle does not change the appearence of row

created 10 years ago (modified 10 years ago)

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?

Comments (1)
DevExpress Support Team 10 years ago

    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.

    Answers approved by DevExpress Support

    created 10 years ago (modified 10 years ago)

    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

      created 8 years ago

      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就可以正常了。

        Comments (1)

          Just ignore the Chinese characters if you are not Chinese, O(∩_∩)O~~

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.