468,720 Members | 1,911 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,720 developers. It's quick & easy.

How to set the datagrid in edit mode

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
Nov 19 '05 #1
1 1203
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

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Simon | last post: by
2 posts views Thread by pei_world | last post: by
3 posts views Thread by Jim Heavey | last post: by
4 posts views Thread by Jim Heavey | last post: by
3 posts views Thread by Leo | last post: by
1 post views Thread by MrMike | last post: by
9 posts views Thread by rn5a | last post: by
8 posts views Thread by =?Utf-8?B?bWlrZWc=?= | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Oskars | last post: by
9 posts views Thread by bryonone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.