How to set the datagrid in edit mode

Discussion in 'ASP .Net' started by David Sagenaut, Oct 16, 2005.

  1. Can I set a whole datagrid in edit mode, like a table? I can edit the data
    in the datagrid. After done, I can click the save button to save the data
    into a datasousce. I don't want to used the build-in edit function in the
    datagrid in which you only can edit one line at a time. I want to edit
    whole datagrid and save it just once. Thanks in advance.

    David
     
    David Sagenaut, Oct 16, 2005
    #1
    1. Advertising

  2. If your DataGrid EditTemplates display only textboxes, you would get the
    outcome you desire by replacing the BoundColumns with TemplateColumns that
    define only the ItemTemplate with textboxes; in which case you get only the
    edit mode.

    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:TextBox runat=server Text='<%# DataBinder.Eval(Container.DataItem,
    "FieldName")%>'></asp:TextBox>
    </ItemTemplate>
    </asp:TemplateColumn>
    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "David Sagenaut" wrote:

    > Can I set a whole datagrid in edit mode, like a table? I can edit the data
    > in the datagrid. After done, I can click the save button to save the data
    > into a datasousce. I don't want to used the build-in edit function in the
    > datagrid in which you only can edit one line at a time. I want to edit
    > whole datagrid and save it just once. Thanks in advance.
    >
    > David
    >
    >
    >
     
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Oct 16, 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. Vincent
    Replies:
    1
    Views:
    464
    Lucas Tam
    Aug 17, 2005
  2. Replies:
    2
    Views:
    4,752
    Trevor Benedict R
    Oct 22, 2005
  3. Horus Alkebulan

    How to set up validators for edit mode of a datagrid?

    Horus Alkebulan, Jan 19, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    132
    Teemu Keiski
    Jan 19, 2004
  4. Sharon McCarty
    Replies:
    0
    Views:
    265
    Sharon McCarty
    Nov 24, 2004
  5. Frank Kurka
    Replies:
    8
    Views:
    322
Loading...

Share This Page