473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Editing DataSet

Hello,
I want to edit a dataset returned from a webservice, in the dataset, there
is three columns - DisplayOrder, Location, Time...
What i would like to do is replace the DisplayOrder column with a new column
(called Type), and i would like the column Type to be the first column (with
an index of zero).
How can i do this?
Thanks
Tony
Nov 15 '05 #1
3 4245
Tony,
When you say 'edit' are you referring to Windows Forms or Web Forms?

Have you tried adding a column to the DataTable object & removing the
unwanted column (after you received it). Then bind the DataTable to a
System.Windows.Forms.DataGrid?

See DataTable.Columns.Add & DataTable.Columns.Remove

When you bind to the System.Windows.Forms.DataGrid you can give Table Styles
to specify the order of the columns displayed (or hidden). See
DataGridTableStyle & DataGridColumnStyle.

Hope this helps
Jay

"Tony" <li***********@hotmail.com> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
Hello,
I want to edit a dataset returned from a webservice, in the dataset, there
is three columns - DisplayOrder, Location, Time...
What i would like to do is replace the DisplayOrder column with a new column (called Type), and i would like the column Type to be the first column (with an index of zero).
How can i do this?
Thanks
Tony

Nov 15 '05 #2
What you said i have already tried out before.. but yes.. the problem is the
type of the columns are different, one is int32 and one is string which
gives me headache coz i can't simply rename it
Nov 15 '05 #3
Hi Tony,

May I ask why you want to insert the new column in the first position?
that's the origin of all yours trouble, if you can live with it inserted at
the end, then you are ok.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Tony" <li***********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
What you said i have already tried out before.. but yes.. the problem is the type of the columns are different, one is int32 and one is string which
gives me headache coz i can't simply rename it

Nov 15 '05 #4

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

Similar topics

8
by: Sam Collett | last post by:
Is there a basic guide on Xml document creation and editing (simpler than the MSDN docs). Say I want to create a file containing the following: <?xml version="1.0" encoding="utf-8"...
0
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is...
3
by: Islamegy | last post by:
When i press btn_save all changed rows in my grid get saved except the last editing row... I want my btn_Save to end editing in the datagrid.. so if user didn't press "enter" after editing last...
1
by: Blake Versiga | last post by:
When editing a datagrid (C#) I need to know if the user changed the value of cell AND what the previous value was. Is this possible? If so how do I get the previous value or at least if the...
2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
1
by: Jeff Petter | last post by:
I can't seem to get the update piece working properly while doing in-place editing. I don't receive any errors, but the update doesn't take place. From the examples I've used as "go bys" it looks...
10
by: Nathan Sokalski | last post by:
I have a DataList control with an EditTemplate. Three of the controls in this template include a Calendar, a Button with CommandName="update", and a Button with CommandName="cancel". Whenever I...
0
by: Stewart | last post by:
Sorry for the cross post. Not sure which forum covers these issues: I'm hoping someone can help me figure out what I'm missing in my code. I am trying to configure a Datagrid for editing. So...
2
by: Bill Manring | last post by:
I am writing a very simple web application using VS 2005 and a SQL Server Database. I am just starting to experiment wth .NET 2.0 and I am trying out the supposedly improved databinding. I...
0
by: hanusoft | last post by:
This is an example of editing in DataGrid and Default Paging http://www.hanusoftware.com Html Design Code : - <asp:DataGrid id="DataGrid1" DataKeyField="id" runat="server" Height="224px"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.