locked
how to edit and update in gridview RRS feed

  • Question

  • User-1701252903 posted

    Hi

    I am able to add arow to gridview from the following link.

    http://geekswithblogs.net/dotNETvinz/archive/2009/06/09/adding-rows-in-gridview.aspx


    But for that i am unable to keep the gridview properties     insert, select.

    (Because i am not bound to the database. If i bind with the sqldatasource to perform sorting, insert, delete operation; i am getting an error  " GridView1 cannot perform both databind and datasource"

    How should i perform those operations.

    How can i perform the above operations.


    Very Urgent...................


    Thank You


    Monday, July 13, 2009 5:12 PM

Answers

  • User1677448765 posted

    go through this article

    http://www.highoncoding.com/Articles/98_Adding_a_New_Row_in_GridView.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 13, 2009 11:01 PM
  • User-1034726716 posted

    I am able to add arow to gridview from the following link.

    http://geekswithblogs.net/dotNETvinz/archive/2009/06/09/adding-rows-in-gridview.aspx


    But for that i am unable to keep the gridview properties     insert, select.

    (Because i am not bound to the database. If i bind with the sqldatasource to perform sorting, insert, delete operation; i am getting an error  " GridView1 cannot perform both databind and datasource"

    How should i perform those operations.

    How can i perform the above operations.


    Very Urgent...................

    The code mentioned in that link uses DataTable as the DataSource.. So if you are going to do Update, Edit and Delete operations in the GridView using the ADO.NET way with DataTable then forget about the SqlDataSource because by default a GridView cannot have a multiple datasource..

    Check this example below for the continuation of the example that you are refering:

    Adding Rows in GridView with Edit, Update and Delete Functionality


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 13, 2009 11:20 PM

All replies

  • User-1226263862 posted

     Post the datasource and gridview code so we can see what is going on.  Also post the exact error you receive when loading the page.

    Monday, July 13, 2009 10:52 PM
  • User1677448765 posted

    go through this article

    http://www.highoncoding.com/Articles/98_Adding_a_New_Row_in_GridView.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 13, 2009 11:01 PM
  • User-1226263862 posted

     I viewed the posted link previously.  What I was asking for is your code, that link doesn't have your exact code.  My guess is you have a syntax error (even if you copied and pasted it). 

    Monday, July 13, 2009 11:17 PM
  • User-1034726716 posted

    I am able to add arow to gridview from the following link.

    http://geekswithblogs.net/dotNETvinz/archive/2009/06/09/adding-rows-in-gridview.aspx


    But for that i am unable to keep the gridview properties     insert, select.

    (Because i am not bound to the database. If i bind with the sqldatasource to perform sorting, insert, delete operation; i am getting an error  " GridView1 cannot perform both databind and datasource"

    How should i perform those operations.

    How can i perform the above operations.


    Very Urgent...................

    The code mentioned in that link uses DataTable as the DataSource.. So if you are going to do Update, Edit and Delete operations in the GridView using the ADO.NET way with DataTable then forget about the SqlDataSource because by default a GridView cannot have a multiple datasource..

    Check this example below for the continuation of the example that you are refering:

    Adding Rows in GridView with Edit, Update and Delete Functionality


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 13, 2009 11:20 PM