This is a migrated thread and some comments may be shown as answers.

How tocheck if row exist ?

3 Answers 243 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Filleau
Top achievements
Rank 1
Filleau asked on 27 Oct 2010, 03:53 PM
Hi,

I'm using the latest telerik build, with VS 2010 (vb net)

I Have a RadGridView and I fill it programatily.
There is 4 columns : First Name, Last Name, Age, Adress and many row (near 3000)

How can I check if a row exist a row with First Name & Last Name already exist, without having to loop on each row and without have effect on the display ?

Thanks

Anthony


Ps : The demo have a lot of error under Windows 7 - 64Bits caused by the OleDB 4.0....

3 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 27 Oct 2010, 09:04 PM
Hello Fileau,

Let's start with the demo, it is throwing those exceptions because you have not set the target platform to x86, please change it to x86 and it will work, or you can follow this article

For the searching, because you are adding the data programmatically ( i assume data binding) i would suggest implementing a search method inside your collection (or if you are not using a collection class) a method that would iterate your collection and perform the search on that directly without going trough the grid, this way it will be faster.

Other than that you can use filtering to see if there are any values inside the grid that match, but all of these methods are iterating trough all the rows one way or another

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Filleau
Top achievements
Rank 1
answered on 29 Oct 2010, 07:14 AM
Hi

Thanks for your reply.

Everything work now.
0
Emanuel Varga
Top achievements
Rank 1
answered on 29 Oct 2010, 08:08 AM
Glad to be able to help, if you have any more questions please just let me know, and if the question has been solved, please mark the question as answered, so that others can find the answers to their questions faster.

Best Regards,
Emanuel Varga
Tags
GridView
Asked by
Filleau
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Filleau
Top achievements
Rank 1
Share this question
or