Ticket T823311
Visible to All Users

Ardorner UI Manager - Guide - GridView Cell

created 5 years ago

Hello,

I've tried to use the Adorner UI Manager with a Guide element to highlight a certain GridView's cell (in my case: the focused cell).

Please refer to the image in the attachments.

I've used the Adorner UI Manager, created a Guide element.

Via code I get the focused cell's bounds (got it from another ticket, with ViewInfo and so on…). Then I create in runtime a new, transparent label, send it to back and draw it at the same position of a certain cell. It works. However, not that fine…  is there a better way to accomplish this task? In my solution it is realy hacky and buggy, after showing and hiding the guides I cannot click at the cell again (focus problems) and so on…

I think I would need a way to clean up the runtime created stuff at least, but there is not Hiding-Event for the Adorner UI Manager or somthing simular I could use.

Anyway, it would be great if you could offer an example solution.

Greetings!

Show previous comments (4)
Nadezhda (DevExpress Support) 5 years ago

    Hello,

    You chose the right approach to highlight only one cell and show the popup form at the same time. However, you mentioned that your cell cannot be clicked in this case. Could you modify the attached project to demonstrate this behavior? Also, clarify what action you wish to perform after you click a current cell? How do you close the guide?

    As for the target location, initially, you talked about GridControl's cells. However, this function is required when you wish to highlight a tab page. Do you mean another control? If so, please specify it. Also, it would help if you share a couple of screenshots to demonstrate the current and required behavior.
    I look forward to your response.

    JL JL
    Joey Langela 1 5 years ago

      Thanks

      In your Example form resizing doen't affect the highlighted guide region

      Nadezhda (DevExpress Support) 5 years ago

        Hello Joey,

        The area that should be highlighted using Gauge is manually set in my project. If you need to change it based on the control size, you can handle the control's Resize event and modify the Bounds value based on your requirements. Here is a sample code snippet:

        C#
        private void Form1_Resize(object sender, EventArgs e) { GridViewInfo viewInfo = (gridView1.GetViewInfo() as GridViewInfo); GridCellInfo cellInfo = viewInfo.GetGridCellInfo(0, gridView1.Columns[0]); Rectangle CellBounds = cellInfo.Bounds; (guide1.TargetElement as Cell).Bounds = CellBounds; }

        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.