473,769 Members | 7,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

the find in a dataview???

My problem is the following one it is in a datagridview I am showing some
data and I would like to locate me in a certain line.

Ex. Locate me in a line that has the telephone 999 and this orderly one for
name

ID - NAME - TELEPHONE
1 - AAA - 111
2 - BBB - 444
3 - CCC - 555
4 - DDD - 666
.. -... -..
20 - II - 999
.. -... -..
NN - NN - NN

Telephone is not key primary in the datatable

I want to continue showing all the registrations that is to say I cannot use
the filter and I want that this orderly one for name.

Then it is supposed that the method find of the dataview would not work,
since if I want to look for for telephone he/she has to be ordered by
telephone.

That is to say that the only option that I know is to travel me the list to
know in that lines this to select it.
I find difficult to believe that this is the solution.

Is there another class but appropriate for what I need????

I request you make me see the light.




Oct 26 '06 #1
1 1582
Raul,

You can make as many (New) dataviews as you want (so with that you can solve
your problem). However, you give the idea in the way you wrote your message,
if what you call "traveling" through the code is a lot of work, while it is
nothing more than a for loop. How do you think that it is done behind the
scene? DotNet programming is real programming, not a kind of program
generating. (Although there are a lot of wizards and designers to help you).

As last; there is no problem with crossposting to these dotNet newsgroups as
it is proper done.
Some people won't answer if there are more than 3 crosspostings.

I hope this helps,

Cor

"Raul" <ra**@inmovilla .comschreef in bericht
news:er******** ********@TK2MSF TNGP03.phx.gbl. ..
My problem is the following one it is in a datagridview I am showing some
data and I would like to locate me in a certain line.

Ex. Locate me in a line that has the telephone 999 and this orderly one
for name

ID - NAME - TELEPHONE
1 - AAA - 111
2 - BBB - 444
3 - CCC - 555
4 - DDD - 666
. -... -..
20 - II - 999
. -... -..
NN - NN - NN

Telephone is not key primary in the datatable

I want to continue showing all the registrations that is to say I cannot
use the filter and I want that this orderly one for name.

Then it is supposed that the method find of the dataview would not work,
since if I want to look for for telephone he/she has to be ordered by
telephone.

That is to say that the only option that I know is to travel me the list
to know in that lines this to select it.
I find difficult to believe that this is the solution.

Is there another class but appropriate for what I need????

I request you make me see the light.




Oct 27 '06 #2

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

Similar topics

1
2350
by: Vitor Silva | last post by:
I'm trying to find the first record based on a string with wildcards. Ex: nº Name 0 John 1 Mary 2 Mariah 3 Mike dataview.sort="name"
3
6578
by: MajorTom | last post by:
Hello I need help. I have a datagrid that have a dataview as datasource. in the keyup event of one textbox I use dataview.rowfilter = some.text; when the condition of my rowfilter return some rows, everything works fine. At the point that the rows returned by the rowfilter is cero (0), the datagrid don't get the rows even if I use a new rowfilter with results, the
2
6211
by: Zenobia | last post by:
Hi, Below is a bit of code from ASP.NET Unleashed which gives an error and I can't figure out why. It uses the Authors table from the standard Pubs database. The error message is "System.ArgumentException: Expecting 2 value(s) for the key being indexed, but received 3 value(s)."
3
2166
by: oscar | last post by:
i've created a search function, using vc#, and i'm using the dataview.find() method to get the index of the found record. the problem is that there are many similar names. it always returns the same index, but it can be any one of the items. as an example, if i type in the work "bolt" it will return the index 1201, the first "bolt" is at 1120 and the last one is at 1294. it is for a point of sale program and i have no control over the...
4
2619
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1, "Facilities").Position = iPos That is the code.. dr is DataRow. If dr.Item("ID") = 3, the find will return position 0, which it should have been 1, and if the ID = 2, it will return 1, which should have been 0.. The DA has a connection string that sorts it...
2
2457
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I need to locate a row (or see if it exists) in a table contained in a dataset. The DataView.Find method seems to work OK for one criteria but I need to use 2 criterias. Is there anything in VB2005 that does was DLookUpd does in Access - but for a table contained in a Dataset? I realize that DLookUp works on Physical tables (not in-memory dataset tables), and I could use a sqlDataReader to find my row from the physical...
4
14649
by: =?Utf-8?B?UmljaA==?= | last post by:
Is it possible to use a wildcard like feature with Dataview.Find? Actually, I tried that but did not get any rows. Is there some wildcard like feature of the dataview or some other object that I could search/find rows in an ADO.Net dataTable? Or, am I stuck having to write a loop and search the loop for a substring of an expression?
3
19813
by: Edwin Smith | last post by:
Hello: I have the following code which works on a DataGridView binding source: private void textBox1_TextChanged(object sender, EventArgs e) { this.pATIENTSBindingSource.Position = this.pATIENTSBindingSource.Position("Name", textBox1.Text); }
1
2978
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, I set a dataview to a table. Then I bind a currencyManager to the dataview. I can iterate through the dataview no problem so far. Then I sort the dataview on a certain field and rebind the currencyManager to the dataview. I can still iterate through the newly sorted dataview OK. The problem is that the row order of the underlying table did not change with the sort. Now the rows are out of order if I want to set a datarow...
0
951
by: Michael_R_Banks | last post by:
I have a table ("checkout") that I'm tracking equipment checkout transaction. It has columns: checkoutid (key), checkedbyid, checkedtoid, dateout, datein and inventoryid. When the user scans an equipment barcode (Entry), I'm trying to check if that equipment was previously checked out, but not properly checked back in by looking up the inventoryid and then searching for a blank datein field. I've declared the dataview with: Dim dvChk...
0
9589
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
10216
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
10049
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
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8873
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
7413
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
5309
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.