Home - Forums-.NET - FlyGrid.Net (Windows Forms) - ButtonColumn ButtonClick event gets triggered on HeaderClick

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

ButtonColumn ButtonClick event gets triggered on HeaderClick
Link Posted: 14-Mar-2006 06:01
When I subscribe to ButtonClick event on ButtonColumn, the event gets triggered when I click the header as well. I wouldn't expect it to behave like this?
Link Posted: 15-Mar-2006 04:39
No, may be you're connect this event handler to another event?
Link Posted: 15-Mar-2006 04:51
All I did is subscribe to that event?

(col as ButtonColumn).ButtonClick += new ButtonColumnClickHandler(WorkingOrdersGrid_ButtonClick);
Link Posted: 15-Mar-2006 05:42
Very strange. I've checked this problem - all works fine, and click on the header doesn't fires ButtonColumn.ButtonClick event.
Can you provide me ()with a sample?
Link Posted: 16-Mar-2006 00:39
I sent you a sample that shows this behavior
Link Posted: 16-Mar-2006 01:49
Thanks for the sample, this helps us to quickly fix this error.
Now you can use following workaround of this problem:
[c#]
void Form1_ButtonClick(object sender, NineRays.Windows.Forms.Data.NodeBase node)
{
  if (node != null) // if node == null this is 'false' firing of this event on empty FlyGrid.
  {
    MessageBox.Show("Click");
  }
}

PS: fixed version of FlyGrid will available at the end of this week.