GridView Add?

Posted by: jhgarniss on 10 September 2017, 11:38 am EST

  • Posted 10 September 2017, 11:38 am EST

    Hi all,

    How do I go about using the gridview to add records to a table? I have my datasource setup and the delete/update works, the insert statement is generated, but how do I get the ability to have a user add a new record from within the gridview?

    Thanks,
    Jon
  • Replied 10 September 2017, 11:38 am EST

    Hello Jon,

    Please check the attached sample("GridViewAddRow") implementing the same and let me know if you have questions.

    Regards
    Ashish
    2011/06/GridViewAddRow.zip
  • Replied 10 September 2017, 11:38 am EST

    Hi Ashish,

    So essentially I have to do it outside of the gridview right? Then the add occurs in the code behind and the refresh occurs as part of the grid view?
  • Replied 10 September 2017, 11:38 am EST

    Hello Jon,

    Yes, we are adding the row to the underlying data collection on the server, and then rebinding the gridview to the collection.

    Regards
    Ashish
  • Replied 10 September 2017, 11:38 am EST

    Cool, thanks!
Need extra support?

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

Learn More

Forum Channels