Ticket T443126
Visible to All Users

XtraGridControl - How to change the row's height by the mouse double click

created 8 years ago

[DevExpress Support Team: CLONED FROM Q450528: How can I resize a single row in DevExpress XtraGrid (Winforms)?]
Using the CalcRowHeight event works, but only after the grid is being resized.
How can I force this event to fire ?
What I want to do is when the user doubleclicks on a row this row should get a larger rowheight than other rows, so I set a private variable to the rowhandle in the doubleclick and in the CalcRowHeight event I check for this private variable.
This works but only when the grid resizes.
So I need to fire this event from the DoubleClick event, how can I do that ?
I tried GridView1.Invalidate() but that does nothing

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hello,

To fire the GridView.CalcRowHeight event manually, you are required to call the GridView.LayoutChanged method. I have created a small sample to demonstrate this behavior. Please try this approach and let us know your results.
I look forward to your reply.

    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.