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
914
BeforeColPosChanged event problems
posted

Using 10.2 UltraWinGrid: I resolve the Click event to show a dialog when the user clicks on the header row. Unfortunately, when the user drags the column header to resize the column, the grid acts as if the header is being resized (you get the correct sizing mouse cursor and dragging changes the location of the vertical line), but as soon as the mouse button is released, the column remains the original size, my Click handler shows my dialog. I thought I could use the BeforeColPosChanged event to set a flag to keep my handler from processing the Click event. But it turns out that the BeforeColPosChanged event doesn't even get raised in this case. If my handler doesn't show the  dialog the column gets resized as it should. But I can determine that the Click event is received before getting the BeforeColPosChanged event; thus, I can't determine that the header click should be ignored. I would think that one of two things should be: (1) the control should not even raise the Click event when the header column is being resized, or (2) the BeforeColPosChanged event should be received before the other event. I actually think it is wrong to raise the Click event if the action being performed is not really a "click" but a "column resize". Comments?