Edit multiple rows of a datagrid (ASP 1.1)

Discussion in 'ASP .Net Datagrid Control' started by postings@alexshirley.com, Apr 14, 2005.

  1. Guest

    Hi

    Silly question here I guess.....

    I know I can use an EditCommandColumn to edit a particular row in a
    datagrid:

    --------------------------------
    Private Sub DataGrid_Edit(ByVal source As System.Object,ByVal e As
    System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    DataGrid.EditCommand
    DataGrid.EditItemIndex = e.Item.ItemIndex
    Call BindTheDataGrid()
    End Sub
    --------------------------------

    Is there anyway I can update more than one row?

    i.e. When the datagrid is first displayed one or more rows are already
    displayed as editable so the user is effectively prompted/forced to
    enter the information in?

    Many thanks

    Alex
    , Apr 14, 2005
    #1
    1. Advertising

  2. Brock Allen Guest

    You'll have to use TemplateColumns for everything and make controls that
    allow the user to edit everything at once. In your postback code then you'll
    have to manually iterate over every row and grab the data and do your updates
    to the DB.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi
    >
    > Silly question here I guess.....
    >
    > I know I can use an EditCommandColumn to edit a particular row in a
    > datagrid:
    >
    > --------------------------------
    > Private Sub DataGrid_Edit(ByVal source As System.Object,ByVal e As
    > System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    > DataGrid.EditCommand
    > DataGrid.EditItemIndex = e.Item.ItemIndex
    > Call BindTheDataGrid()
    > End Sub
    > --------------------------------
    >
    > Is there anyway I can update more than one row?
    >
    > i.e. When the datagrid is first displayed one or more rows are already
    > displayed as editable so the user is effectively prompted/forced to
    > enter the information in?
    >
    > Many thanks
    >
    > Alex
    >
    Brock Allen, Apr 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    1,610
  2. =?Utf-8?B?RGF2aWQ=?=

    Datagrid: Edit all rows?

    =?Utf-8?B?RGF2aWQ=?=, Feb 10, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,564
    Alan Lambert
    Feb 10, 2005
  3. Schultz
    Replies:
    3
    Views:
    547
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  4. ad
    Replies:
    1
    Views:
    3,514
    charmis p varghese
    Mar 3, 2005
  5. Alfredo Barrientos

    Edit All rows in Datagrid

    Alfredo Barrientos, Sep 12, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    3,073
    Alfredo Barrientos
    Sep 15, 2005
Loading...

Share This Page