Ticket Q559419
Visible to All Users

How to get GridView's cell rectangle

created 11 years ago

Hello,
How to get cell rectangle for DevExpress.XtraGrid?
Regards,
Vadim

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hi,
To achieve your goal, use the following code:

C#
GridViewInfo gridViewInfo = (GridViewInfo)gridView1.GetViewInfo(); GridCellInfo gridCellInfo = gridViewInfo.GetGridCellInfo(gridView1.FocusedRowHandle, gridView1.FocusedColumn); Rectangle cellRectangle = gridCellInfo.CellValueRect;

I hope you find this information useful. Let me know if you have additional questions.

    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.