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

get value of item from dataview

Hi,

If a dataview is based on a table and I filter this view

dataview1.RowFilter = "Name Like '" & strCriteria & "'"

where Name is a field in the datasource table, I get a
subset of this table. If I have an ID column, how can I
retrieve the ID values of the filtered rows? Say the
table has 10 rows and I filter it so that the subset has 3
rows. How can I retrieve the values of the ID column for
these 3 rows? Can I iterate through this subset, how?

Thanks,
Jerry
Nov 20 '05 #1
2 21609
Hi Jerry,

You do not believe that it is this simple
\\\
dim myId as string
For i as integer = 0 to dataview1.count - 1
myId = dataview(i).item("ID").toString ' this ID is case sensetive
next
///
This routine is of course nuts, however as sample

I hope this helps?

Cor
Nov 20 '05 #2
Hi Cor,

I see what I was missing. I was trying

i= dataview.Item("ID")

which was giving me an error (well, something like this).
I left out the row index part.

Thanks for your help.

Jerry
-----Original Message-----
Hi Jerry,

You do not believe that it is this simple
\\\
dim myId as string
For i as integer = 0 to dataview1.count - 1
myId = dataview(i).item("ID").toString ' this ID is case sensetivenext
///
This routine is of course nuts, however as sample

I hope this helps?

Cor
.

Nov 20 '05 #3

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

Similar topics

4
by: Jim Heimer | last post by:
When I use the dataview.rowfilter and I try to display the field value of the first row, the code doesn't seem to show the first row AFTER the rowfilter. This is my code: DataView...
5
by: Jason | last post by:
I've been trying to figure out a good way to do this but haven't had much luck, any input would be greatly appreciated. Basically, after a datagrid is sorted, how can I get the primary key value...
6
by: enrique | last post by:
Hello, I simpy want to place a record ID into a session variable. I know how to create session variables, I'm just can't figure out the syntax for the record item when I'm working with a...
5
by: timpera2501 | last post by:
Hi, I'm a bit new to C# and .NET and I'm struggling to find the right syntax for my problem. I am trying to figure out how to get a single value from a view? Row 0, Column 0 (the view has...
1
by: Brian Shafer | last post by:
Hello, I am a newbi to this fourm and to vb.net.... moving from vb classic. Testing with a database connection, got my data in the dataview control. But now, I want to be able to double click a...
1
by: diego | last post by:
Hi all, If I have a combo bound to as datasource, how can I search for a particular value. example i have the value 1,2,3,4 in col1 and A, B, C, D in col 2 of a datatablem and this datatable is...
5
by: Earl | last post by:
Noting first that I'm coming from VS2003 and VB.Net ... Using an untyped dataset, I create a dataview. When I try to use the Item property, "Item" does not appear on the Intellisense dropdown and...
3
by: Elmo Watson | last post by:
I previously had a project working, in which the Gridview was populated by a DataSet - then, with a DropDownlist in one of the columns, using the OnrowDataBound event, to populate the DDL with the...
7
by: Hemang Shah | last post by:
I think what i'm trying to do is passing by value. Here is the scenario: Main Form - which calls a Search form. - I pass Mainform as a reference so that I can pass data between the two. Code:...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.