M
Magnus.Moraberg
Hi,
I have a number of binding navigator controls on my form. I add "plus"
buttons (buttons used to add a new row to the relevant datagirdview)
to them as follows -
bindingNavigator.AddNewItem.Enabled = false;
this.bindingNavigator.Items.AddRange(new
System.Windows.Forms.ToolStripItem[]
{
...
this.bindingNavigatorAddNewItem,
...
});
Each Binding Navigator has a "plus" toolStripButton which I add an
event to as follows -
this.bindingNavigatorAddNewItem.Click += new
System.EventHandler(this.AddRowToDataGridView);
All the plus buttons have the exact same handler -
this.AddRowToDataGridView.
I was wondering if it would be possible to loop through my
BindingNavigators and identify those toolStripButtons that have
this.AddRowToDataGridView as a handler. By doing so, I can identify
all "plus" buttons and set these buttons as disabled or enabled as I
so desire.
Thanks,
Barry
I have a number of binding navigator controls on my form. I add "plus"
buttons (buttons used to add a new row to the relevant datagirdview)
to them as follows -
bindingNavigator.AddNewItem.Enabled = false;
this.bindingNavigator.Items.AddRange(new
System.Windows.Forms.ToolStripItem[]
{
...
this.bindingNavigatorAddNewItem,
...
});
Each Binding Navigator has a "plus" toolStripButton which I add an
event to as follows -
this.bindingNavigatorAddNewItem.Click += new
System.EventHandler(this.AddRowToDataGridView);
All the plus buttons have the exact same handler -
this.AddRowToDataGridView.
I was wondering if it would be possible to loop through my
BindingNavigators and identify those toolStripButtons that have
this.AddRowToDataGridView as a handler. By doing so, I can identify
all "plus" buttons and set these buttons as disabled or enabled as I
so desire.
Thanks,
Barry