locked
Using the gridview to Insert a Record RRS feed

  • Question

  • User1659040753 posted
    This might have been covered by someone already, but I was wondering if there is a way to use the gridview and dynamic data to insert a record.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    I am aware the you can update and delete using the gridview.

    Maybe use the footer template?

     

    Wednesday, June 4, 2008 9:21 PM

All replies

  • User1659040753 posted

    The answer is to use a ListView. 

    Doh!

    Wednesday, June 4, 2008 9:59 PM
  • User-989915499 posted

    Hi There,

    Not sure you aware of this.

    Have all the example of GridView and DataList

    http://www.asp.net/learn/data-access/

    Hope it helps!

    Wednesday, June 4, 2008 10:09 PM
  • User1659040753 posted

    I dont see how a datalist and gridview help me with inserting? 

    My goal is to have a gridview like experience where you can add, edit, and delete.  Where you dont have to go to another page.

    Bryan

    Wednesday, June 4, 2008 10:28 PM
  • User-989915499 posted

    Hi There,

    If you scroll down a bit, you will able to see a tutorial that show you how to insert a new record with footer.

    http://www.asp.net/learn/data-access/tutorial-53-vb.aspx

    Wednesday, June 4, 2008 10:40 PM
  • User1659040753 posted
    Thanks for looking that up.  Is this what you suggest as opposed to the ListView.  <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    The reason I ask is because the GirdView does not seem to be built for inserting. Also, since I am using DynamicData I want to have metadata support. 

    I did not try to place DynamicControls into the footer of a GridView, maybe it would work.  I would have tried that way you suggested if David Ebbo did not suggest the ListView. 

     

    Friday, June 6, 2008 7:26 PM
  • User-330204900 posted

    Hi BringerOD, I don't know if you gave up or found another answer but I thought I post this anyway:

    Hi I decided that I'd not bother with getting the GridView to do Insert and instead get the ListView to be a bit more dynamic, so heres my article:Dynamic Data Custom Pages: Dynamic/Templated Grid with Insert (Using ListView)

    From Windows Live Writer

    Hope this helps Big Smile

    Thursday, October 9, 2008 4:01 AM