Home - Forums-.NET - FlyGrid.Net (Windows Forms) - OnMouseClick col is wrong if grid has hidden cols

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

OnMouseClick col is wrong if grid has hidden cols
Link Posted: 22-Mar-2006 09:37
Hi,

overridden OnMouseClick in a grid receives the wrong col id when the grid contains hidden columns. It returns the ID measured by visible columns. So, for example I get ID 4 when it's the 5th visibile column but in reality the ID is 8.

Tom
Link Posted: 22-Mar-2006 23:39
I've test this problem and use following code for diagnostics (before tests I've hide some columns and reoder columns):
[c#]
protected override bool OnMouseClick(FlyGridViewPort port, NodeBase node, int col, int x, int y, int count, MouseButtons button)
{
  Debug.WriteLine("Clicked Column is " + this.Columns.VisibleColumns[col].Caption);
  base.OnMouseClick(port, node, col, x, y, count, button)
}


My tests is show that all works fine - columns recognized correctly.
Link Posted: 23-Mar-2006 00:42
Well, yes it does when I use VisibleColumns ... but how am I supposed to know that I need to use VisibleColumns here?
Link Posted: 23-Mar-2006 02:37
Sorry for missing documentation, we're working on improvements.