RAD for N-Tier web apps in .NET

April 28, 2006

Editable GridView with Add New/Insert button

Filed under: .NET, General — Eric P @ 6:05 pm

1 Comment »

  1. Hi,

    I am trying to implement this with a SqlDataSource, and I am having particular trouble with the following method:

    protected void objectDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
    List list = (List)e.ReturnValue;

    //Add empty record for the first row
    if (_addButtonClicked)
    {
    list.Insert(0, new Customer());
    }
    }

    How can I change this to work with a SqlDataSource. Also, are there any other changes I need to make to the code?

    Thanks!

    Comment by boradio — July 27, 2006 @ 3:41 pm |


RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Blog at WordPress.com.