Adding new records using C1InputPanel

Posted by: gerry.mcdermott on 17 January 2018, 7:50 am EST

    • Post Options:
    • Link

    Posted 17 January 2018, 7:50 am EST

    Hi,

    I would like to use the C1InputPanel but not the InputNavigator.

    If I do use the navigator buttons for example, Add, then I get a lot of functionality built in. It automatically adds a blank row, moves the record pointer to that new row and changes focus to the first text box…great

    If I make the navigator invisible and just use a bindingsource to add record, if have to manually set the focus, move the pointers etc.

    How do I use the functionality of the buttons on the navigator in code?

    Thank you

    Gerry

  • Posted 18 January 2018, 7:34 am EST

    Hi Gerry!

    Though ClickButton() method of InputDataNavigator allows you to use functionality of these buttons without actually clicking on them. But, it won’t work if you make InputDataNavigator hidden.

    You can let me know the use case, probably I can suggest you something appropriate.

    Best regards,

    Meenakshi

  • Posted 18 January 2018, 12:14 pm EST

    Hi Meenakshi,

    I would just like to use my own buttons, style them and place them where I want on the form.

    I want to have Add,Change,Delete,Save,Cancel set of buttons. The placement and the style of input panel buttons does not suit. I thought I could call the methods they use - but I could not find those methods.

    I could attach a bindingsource to the same datasource as the inputPanel. Then just call, bindingSource.AddNew(). But that does not move the current row pointer in the InputPanel to the newly created row.

    The best solution I came up with was to leave the navigator visible and change it’s height and width so it’s controls are not visible. Then I can call the clickbutton() as you suggested and it works. It just feels clunky… so if you have another suggestion, I would welcome it.

    Thank you

    Gerry

  • Posted 19 January 2018, 1:31 am EST

    Gerry!

    Setting InputDataNavigator.Height = 0, gives the effect of hidden navigator. And, it seems to be the only workaround in this scenario.

    For any further assistance, do let me know.

    Best regards,

    Meenakshi

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels