Appending new entry to DXperiance data grid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    Appending new entry to DXperiance data grid

    Here's my problem, the data grid already has a button to "append" a new entry, what i want to do is create a button in cutom tool panel and give it a function to "append" a entry. i've tried

    gcAssetUsers.Em beddedNavigator .Buttons.DoClic k(gcAssetUsers. EmbeddedNavigat or.Buttons.Appe nd);
    that doesn't work! can anyone help?
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    I'm not a datagrid guy, or VB... but I can give you a concept that should do it.

    Don't tie one UI item such as your Tool Pallet to another UI item such as where the datagirid is, so tightly. It makes the Tool Pallet something you will put a lot of work into yet can't be re-used on the next project.

    Create an event in the tool pallet for "Append"
    Have the class/form with the datagrid subscribe to the tool pallet's event(s)

    When the datagrid's form "hears" the tool pallet's event, it can then react however you like. (As can other classes that subscribe to the event such as a logging class)


    Second tip: Don't have all the work functionality built right into the button's OnClick event. That just makes it hard to call from other places because you have to make the object & arguments of the Button.OnClick call all the time.
    Instead make a method like "DoAppend() ", and have the button method call it. At first this feels like an added unneeded step - but you'll quickly see how helpful it can be.

    Comment

    Working...