A
Ahmad Qarshi
Hi,
I have to customzie the BindingNavigator control. What I have to do is to
remove few default items from the control like ToolStripTextBox and
ToolStripLabel displaying the Position.
I also need to add one extra ToolStripButton item at the end of the
ToolStrip Items. i.e. after the Delete button.
To fullfil the above requirements, I have inherited my class from the
BindingNavigator control and in constructor I am creating a new
ToolStripButton and adding it to Items of BindingNavigator like below:
ToolStripButton tsbtn = new ToolStripButton();
Image img = new Bitmap(@"Z:\\MyControl\favicon.ico");
tsbtn.Image = img;
this.Items.Add(tsbtn);
It is adding the button item to the BindingNavigator control but at the
beginning i.e. before the "Move First" button. I want it be added at the
end.
To remove the default items from the control whenever I try to remove the
Item it raises an Index out of bound exception. Obviously because no
ToolStripItem created at this point and the Item count is also 0 at this
stage.
Is there any way to do these two things?
Thanks in anticipation.
Regards,
Ahmad Jalil Qarshi
I have to customzie the BindingNavigator control. What I have to do is to
remove few default items from the control like ToolStripTextBox and
ToolStripLabel displaying the Position.
I also need to add one extra ToolStripButton item at the end of the
ToolStrip Items. i.e. after the Delete button.
To fullfil the above requirements, I have inherited my class from the
BindingNavigator control and in constructor I am creating a new
ToolStripButton and adding it to Items of BindingNavigator like below:
ToolStripButton tsbtn = new ToolStripButton();
Image img = new Bitmap(@"Z:\\MyControl\favicon.ico");
tsbtn.Image = img;
this.Items.Add(tsbtn);
It is adding the button item to the BindingNavigator control but at the
beginning i.e. before the "Move First" button. I want it be added at the
end.
To remove the default items from the control whenever I try to remove the
Item it raises an Index out of bound exception. Obviously because no
ToolStripItem created at this point and the Item count is also 0 at this
stage.
Is there any way to do these two things?
Thanks in anticipation.
Regards,
Ahmad Jalil Qarshi