Batch update in gridview?

Discussion in 'ASP .Net' started by rockdale, Sep 12, 2006.

  1. rockdale

    rockdale Guest

    Hi,

    I have a web page which let user data enter employee working hours. I
    used datagrid to list all the employee and templateColumn to format the
    workhours column to textbox for data entry. And have one save button to
    submit all the hours that user entered. On the backend save button
    clicked event, I mannually build my update statement to write the
    workhours into database. Also, if the workhours field is not
    editable(e.g the timesheet is submitted), I use <ItemTemplate> will
    change it to label control.

    I do not like use the editcommand etc 'cause that will require user to
    click edit button to convert to edit mode- which by the way is very
    annoying. But most example on the web is always assume that users are
    happy to click a edit button and then update button row by row.

    even for edit one record only, I think inline edit is not good because
    most case, the datagrid just show the major information from a table
    (space limitted or some info is just can be omitted), but if you want
    add/edit the record, you need to provide values for all the fields.
    For example, I have another page for employee info editing
    So what I did is let the datagrid shows a list of employee info (First
    name, last name, etc...), and when user select a employee I will
    populate this employee's info to another area on the same page, this
    editing area contains textbox. dropdownlist .. so that user can do
    edit/add here. And now I am glad to see that I can use detailsview for
    this.

    I like this approach and is worked very well for me.

    As now we are move on to the GRIDVIEW/detailview/formview, do they have
    something similiar to the approach I used, if they do not have, what is
    the suggestion you guys have for these kind of batch update? user enter
    data in multiple rows and click save button once to save the data.


    Any suggestions /experience are appreciated.

    Thanks
    -rockdale
    rockdale, Sep 12, 2006
    #1
    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. Edward
    Replies:
    1
    Views:
    304
    =?Utf-8?B?UmF2aW5kcmE=?=
    Jun 10, 2004
  2. ML
    Replies:
    1
    Views:
    835
  3. andy6
    Replies:
    2
    Views:
    529
    andy6 via DotNetMonster.com
    Jun 15, 2006
  4. Replies:
    2
    Views:
    3,801
    Jared
    Jun 23, 2006
  5. rockdale

    Batch (NON inline ) update of gridview?

    rockdale, Sep 12, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    396
    rockdale
    Sep 12, 2006
Loading...

Share This Page