Edit All Function for DataGrid, and Moving the Edit Function in a DataGrid

Discussion in 'ASP .Net' started by Schultz, Feb 14, 2005.

  1. Schultz

    Schultz Guest

    is there an easy to follow, source code in one document, article that
    explains how to create an edit all DataGrid control?


    and, I have a DataGrid setup where the client enters information for
    each row by clicking Edit-Update for each row. Each row has several
    columns, is there anyway to move the Edit function to edit each column
    individually for each row in the DataGrid?


    I'll try to find an example for what I am talking about and post it
    back to the thread.
    Schultz, Feb 14, 2005
    #1
    1. Advertising

  2. Schultz

    Schultz Guest

    Schultz, Feb 14, 2005
    #2
    1. Advertising

  3. Schultz

    Scott M. Guest

    Scott M., Feb 14, 2005
    #3
  4. RE: Edit All Function for DataGrid, and Moving the Edit Function in a

    Schultz, I can't point you to the easy to follow source code, but I'm sure
    you can do what you're trying to do.

    Skip the built-in edit logic, because that allows for only one edit row, and
    all it really does for you is remember the row and give you an easy way to
    enter the additional template.

    Instead, give them an "edit all" button, and on select rebind all the labels
    to text fields, etc. The mechanics are up to you, but easiest might be to
    include both the label and the textbox in each cell, and in ItemDataBound set
    the visible= of each to on/off as needed. Or, leave the cell empty for
    starters, and in ItemDataBound add either a label or a textbox to the cell
    (if you do it dynamically though you'll have more work to make sure the
    data's there after postback).

    I'd suggest something similar for the second part of your question: roll
    your own and put an edit button in every cell if you want. Of course, editing
    within the grid can get a little hairy with maintaining scroll position,
    etc., esp. across browsers, and sometimes you're better off jumping to a
    separate form.

    hth,

    Bill

    "Schultz" wrote:

    > is there an easy to follow, source code in one document, article that
    > explains how to create an edit all DataGrid control?
    >
    >
    > and, I have a DataGrid setup where the client enters information for
    > each row by clicking Edit-Update for each row. Each row has several
    > columns, is there anyway to move the Edit function to edit each column
    > individually for each row in the DataGrid?
    >
    >
    > I'll try to find an example for what I am talking about and post it
    > back to the thread.
    >
    >
    =?Utf-8?B?QmlsbCBCb3Jn?=, Feb 14, 2005
    #4
    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. linkswanted
    Replies:
    0
    Views:
    708
    linkswanted
    Dec 21, 2007
  2. linkswanted
    Replies:
    0
    Views:
    1,542
    linkswanted
    Jan 6, 2008
  3. linkswanted
    Replies:
    0
    Views:
    438
    linkswanted
    Jan 23, 2008
  4. linkswanted
    Replies:
    0
    Views:
    621
    linkswanted
    Jan 24, 2008
  5. Andreas Klemt
    Replies:
    0
    Views:
    271
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page