473,587 Members | 2,227 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 1069
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
2337
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
6556
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...
2
6201
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
2154
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...
4
2609
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...
2
2452
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...
4
14620
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
19780
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
2970
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...
0
938
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...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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...
0
6619
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...
0
5392
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2347
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 we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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...

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.