473,405 Members | 2,167 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,405 software developers and data experts.

finding a row number in a datatable for a column value

dee
hi,

I can do the above with the following code, but there must be more
efficient and easier way to do ? I have seen the find on the dataview
but i dont want to have to sort the view is there another way?

Dim i As Int16
Dim itemNO as string

For i = 0 To auctionList.Rows.Count - 1
If itemNo = auctionList.Rows(i).Item
(AuctionListColumns.ItemNo).ToString Then
row = i
End If
Next

Regards

David
Jul 21 '05 #1
1 1683
Hi dee,

Iteration is the only way to find row index in DataTable.
Why do you need it, anyway?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"dee" <da********@kagi.com> wrote in message
news:3e**************************@posting.google.c om...
hi,

I can do the above with the following code, but there must be more
efficient and easier way to do ? I have seen the find on the dataview
but i dont want to have to sort the view is there another way?

Dim i As Int16
Dim itemNO as string

For i = 0 To auctionList.Rows.Count - 1
If itemNo = auctionList.Rows(i).Item
(AuctionListColumns.ItemNo).ToString Then
row = i
End If
Next

Regards

David

Jul 21 '05 #2

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

Similar topics

2
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
1
by: Dan | last post by:
I have a dataset with stock info Date, Open, Hi, Low, Close. How do I determine the Max value of one column? How do I determine the max value of all columns? Thanks in advance - Dan
1
by: melanieab | last post by:
Hi, I have a DataTable and I'm trying to locate some data in a specific column (my primary key column). The data I'm looking for is an int called xFile. I may have the correct way to find the...
4
by: Richard | last post by:
When i try sorting in the database, it sorts the numbers: 0 1 102 2 304 305 4 etc....
1
by: Ersin Gençtürk | last post by:
I have 2 typed data tables inherited from the same dataset schema One called : table A with an identity column x column x is constrained to be unique. Other one is : table B with an identity...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
2
by: Thomas Beyerlein | last post by:
Hello, I am looking it for a way of getting the column name, from a datagrid when the user clicks on one of the cells. I can get the value and the row Number and column Number, but can not seem to...
7
by: melanieab | last post by:
Hi, I'm trying to use DataView to find the row number in the datatable that contains "Rich" in it so that I can highlight it. It works fine when I enter the entire string (i.e. Richard), but I...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
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,...
0
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...

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.