.NET Performance Blog

April 28, 2006

Editable GridView with Add New/Insert button

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

Please see the full post here:

http://www.entechsolutions.com/Blog/ViewPost.aspx?PostID=5 

Advertisements

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 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: