Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Cell border during mousedown
posted

I've spent more time on this than I wish and now I'm at a point of desperation. I've got an issue with borders and I know ultragrid and borders don't play well. I'm able to get the borders to appear how I would like except when the mouse is pressed on the cells that has a border on it. It's difficult to explain without seeing it.  I've attached a video of the problem and I'll try and attach the project later. In the video, it's not obvious but the mouse button is clicked on the that has a right border. When it is pressed, the right border disappears, then reappears when the mouse button is released. The cells that have a left border don't have this problem. Both borders are drawn by setting the Column.CellAppearance to Black.

Is there another property I need to keep the border black?

Missing border.zip
Parents
No Data
Reply
  • 4625
    Offline posted

    Hello Aaron,

    Thank you for posting in our forums!

    Based on the attached video and project sample, I assume the edit mode of your second column`s cells overlaps the left border of the neighbor cells, that escalates to undesired effect. I see in your code incomplete draw filter class implementation, which is one of the right ways to accomplish the appearance you are looking for. So I have edited your project, in order to show you example implementation of the draw filter class. You can read more about draw filtering on the following documentation page:
    http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/Win_Draw_Filter.html

    Another workaround related to your issue is to set custom appearance to all of your cells, when they are in edit mode. The next code snippet handles the initialization event of the UltraWinGrid and set the border color of the cells in edit mode to black.

    private void VotingGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e)
    {
             e.Layout.Override.EditCellAppearance.BorderColor = Color.Black;
    }

    If you need any further assistance or I am missing something, I will be glad to answer your questions.

    SampleGrid_edited.zip
Children