How to Implement Insert Row feature by Programming without the CommandBar

Posted by: summa on 15 September 2017, 10:38 am EST

  • Posted 15 September 2017, 10:38 am EST

    Hi …

    I have to implement a

    spread sheet which has 3 column, such as say Description (Title) column,

    Initial Value column and Annual Value column this is a sheet where we can enter

    budget details, in that I have requirement of implementing the Insert row feature

    when user clicks on a particular button on the spread sheet (which

    CellType PushButton) and therefore I have set the command toolbar to hide

    state.







    Let say I have 3 Titles on the sheet (Estimated Expenses, Internal Funding and

    External Funding) for each of these title there are pre loaded details, e.g. under

    estimated expenditure there are few items with respective values and same for

    other headings as well.







    Other than the Pre loaded Items User can add new items for above titles, by

    click of button,  assume that there is separate column next to the Annual

    Value column  which has place a push buttons for each heading .







    I know that using command bar Insert row button row insertion feature is added

    with this control. But I want it to be implemented when user clicks on the push

    button.







    Questions -

    1. How to Insert row by code in the Button Command event?



    2. Is there anything to with IsheetDataModel in otder to implement this features, beacause as i mention above I have hide the commandBar ,So there is no update button to update when user adds a row in between.



    Please Help, highly appriciate all comments,…

    Sumudu

  • Posted 15 September 2017, 10:38 am EST

    Sumudu,

    In the ButtonCommand event, you can call the AddRows method to add/insert rows in the Spread control client side.

  • Posted 19 July 2023, 7:58 am EST

    cool

  • Posted 1 April 2025, 4:03 am EST

    Great!

Need extra support?

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

Learn More

Forum Channels