New Posts New Posts RSS Feed: [CANCELLED] Adding an Item to the PageNavigatorAdapter
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

[CANCELLED] Adding an Item to the PageNavigatorAdapter

 Post Reply Post Reply Page  <12
Author
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Topic: [CANCELLED] Adding an Item to the PageNavigatorAdapter
    Posted: 04-Dec-2007 at 9:41am
How do I add an item?  Can it even be done?
Cry Cry
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Dec-2007 at 10:03am
Cry
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 30-Nov-2007 at 6:34pm
Criminey!!  Nothing is simple.  The approach of changing the method to public introduces a whole gob of complications.  The interface must be changed, for one.  I tried.  What a headache!
 
I am now thinking that I should just hide the default PageNavigatorAdapter and create my own DevExpress DataNavigator.  I could just wire the two together, then add my own buttons however I desire. 
 
Well, if I am going to do that, I might as well go the whole way and create a whole new DataNavigatorAdapter class.  But, then, I would have to replace the PageNavigatorAdapter on the ControlViews...I am sure that will carry with it a tremendously lethal plague of exceptions that I will have to deal with.
 
Where does this end?
 
I am giving up for the day.  Perhaps someone can chime in here and let me know how to add a toolstripitem to the page navigator.  I will be back at this tomorrow.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 30-Nov-2007 at 5:23pm
In the PageNavigatorAdapter class, could I make this function public?
 
/// <summary>Set the Adapter's ToolStripItem that represents a Button in the navigator.</summary>
/// <param name="pAdapterButton">The adapter's reference to the ToolStripItem.</param>
/// <param name="pNewButton">The new reference to the ToolStripItem in the Navigator.</param>
/// <param name="pClickHandler">The button's click handler.</param>
private void SetButton(ref ToolStripItem pAdapterButton, ToolStripItem pNewButton, EventHandler pClickHandler)
 
Of course, I am editing the IdeaBlade.CAB.UI class, but I do not see another way to do this.  Is there?
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 30-Nov-2007 at 4:58pm

I am not sure if this item has been addressed.  If it has, I apologize for the overlapping post. Ermm

How do I add a button to the PageNavigatorAdapter?  The public class does not appear to allow me to do this:

public class PageNavigatorAdapter : IPageViewToolBar
{
    public PageNavigatorAdapter(BindingNavigator pNavigator);
    public PageNavigatorAdapter(BindingNavigator pNavigator, bool pIsVisible);
    public ToolStripItem AddNewItemButton { protected get; set; }
    public bool AddNewItemEnabled { get; set; }
    public bool AddNewItemVisible { get; set; }
    public BindingSource BindingSource { get; set; }
    public ToolStripItem DeleteItemButton { protected get; set; }
    public bool DeleteItemEnabled { get; set; }
    public bool DeleteItemVisible { get; set; }
    public ToolStripItem EditItemButton { protected get; set; }
    public bool EditItemEnabled { get; set; }
    public bool EditItemVisible { get; set; }
    public ToolStripItem SaveButton { protected get; set; }
    public bool SaveEnabled { get; set; }
    public bool SaveVisible { get; set; }
    public bool Visible { get; set; }
    public WorkItem WorkItem { get; set; }
    public event EventHandler<EventArgs<object>> AddNewItemClick;
    public event EventHandler<EventArgs<object>> DeleteItemClick;
    public event EventHandler<EventArgs<object>> EditItemClick;
    public event EventHandler SaveClick;
}
 
There are plenty of things to utilize for the existing buttons, but no room to add a new button.  I really need this quite badly and I do not want to recreate a navigation toolbar wheel unless I have to.  On second thought, if I did that then I could implement the DevExpress control in its place...hhmmm...
 
Thanks,
Bill


Edited by Linguinut - 06-Dec-2007 at 4:38pm
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down