473,785 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.

Nov 19 '05 #1
3 1511
I don't believe you can have this functionality with the DataGrid control.
"Schultz" <sc*****@a2z4u. net> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
an example of a column edit is here:

http://i.domaindlx.com/campus5edu/col_edit.gif

Nov 19 '05 #2
an example of a column edit is here:

http://i.domaindlx.com/campus5edu/col_edit.gif

Nov 19 '05 #3
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.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2340
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="top"> <ItemTemplate><%# CType(Container.DataItem("DateStatut"),DateTime).ToString("yyyy-MM-dd") %></ItemTemplate> <EditItemTemplate> <asp:TextBox width="80" CssClass="edit_item" id="txtDateStatut"
0
1120
by: Mike | last post by:
Hi, I am having problems with my program, the problem is it will not put the datagrid into edit mode. The .aspx page has the following code in it : - <asp:datagrid id="DataGrid2" runat="server" OnEditCommand="DEDR_Edit2"></asp:datagrid>
3
2284
by: pmud | last post by:
Hi, I have an ASP.NET application using C# code. I am using a datagrid to display records from a database based on a user input, i.e a user enters a compnay name in text box & when he clicks a "Submit" button, only those records are displayed where company name matches with user input. I need the datagrid to be editable. For this i used the walkthrough from ..NET "Using a datagrid for reading & writing data to database" or it was some...
3
4377
by: Tim::.. | last post by:
Can someone please tell me how I go about preselecting an item in a drop drown list when I click the Edit Command in a datagrid? I have tried the following but it doesn't work for me! I would be really grateful for any assistance! Thanks
0
1021
by: jinhy82 | last post by:
Hello! I am using DataGrid to display details from Ms Access. Fe features such as Edit, Update and Delete are added, but they did no function. Can anyone help me? Thank you very much!!! For the update function, am I suppose to write the commane : UPDAT <tablename> SET = "..."? As I am using the "EditCommandColumn", so when I press the "Edit" link everyfield will changed to textbox form, may I know what is that nam for the textbox? Here...
1
1341
by: David Sagenaut | last post by:
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
1
3598
by: nate axtell | last post by:
In VB .Net I made a custom CheckBox column style (for the Datagrid control) that maps to two DataTable columns , one it uses for the Checked status and the other it uses for the Enabled status. I am having a couple problems so far. 1. with the way the Paint method works: When I scroll to the right, the custom column gets Drawn on top of the left-most "Selecting" column (the one where the green arrows are displayed). How can I possibly modify...
9
2729
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
2
1324
by: slinky | last post by:
I had a successfully deployed datagrid reading an XML file and showing the data: Private Function MakeDataView() as DataView Dim myDataSet As New DataSet() myDataSet.ReadXml(Server.MapPath("TimberSales.xml")) Dim view As DataView = New DataView(myDataSet.Tables(0)) view.AllowDelete = False view.AllowEdit = True view.AllowNew = False
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.