473,503 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Working with DataView VB.NET to C#

Liz
Working with a DataGrid/DataView in VB, I have the
following code
VB.NET
//set the OrderID field of a newly added product
_productsData.Item(_productsData.Count - 1) ("OrderID") =
_order.orderID;

I need to convert this to C#??

Liz
Nov 15 '05 #1
1 2687
Liz,

The line would convert like this:

_productsData.Item[_productsData.Count - 1]["OrderId"] = _order.orderID;

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- nick(dot)paldino=at=exisconsulting<dot>com

"Liz" <ec******@cornwall.gov.uk> wrote in message
news:09****************************@phx.gbl...
Working with a DataGrid/DataView in VB, I have the
following code
VB.NET
//set the OrderID field of a newly added product
_productsData.Item(_productsData.Count - 1) ("OrderID") =
_order.orderID;

I need to convert this to C#??

Liz

Nov 15 '05 #2

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

Similar topics

3
5955
by: Kim | last post by:
I need to filter this datatable but when I do it gives me all the data not filter not sure what Im doing wrong. DataView dv = new DataView(); dv.RowFilter = "ClientID = " + clientid;...
2
3273
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
8
1495
by: JackO | last post by:
I have a datagrid that I set the PageSize = 10 and AllowPaging = True, however when I display the page in my browser, it shows 10 rows and the paging arrows but does not page when I click the...
5
8811
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
1
2352
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
3
5446
by: Peter Proost | last post by:
Hi group, I've got this, a dataset which contains ds.tables(0).rows(0).item(0) = "HO" ds.tables(0).rows(1).item(0) = "L1" ds.tables(0).rows(2).item(0) = "L2" ds.tables(0).rows(3).item(0) =...
0
949
by: Tom | last post by:
i have this DataView dv = new DataView(ds.tables); dv.RowFilter = "Carmake=" + strCars; dg.datasource = dv; dg.DataBind(); I get the error" Can't find column BMW is the strCars value not...
4
26681
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
2
18881
by: neeraj | last post by:
Hi, all Could anny one give me help how can I use like operator with these data types "integer , datetime or boolean" in DataView.RowFilter Actually when I try to get the data from dataview...
4
25964
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I'm working in Visual Studio 2005 and C#. I have a DataTable with many rows. The user can delete a row. After the row is deleted, I'd like to column values for the deleted row, but any attempt to...
0
7194
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
7070
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
7267
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
7316
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
7449
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...
1
4993
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...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
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 ...

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.