Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi All,
 
I am creating windows application, i have taken textbox for search the data from datagrid view, but its not working proper.
 
I want it like if i enter "A", it should disply all words which are starting from A
 
Plz help !!!
 
Thanks!
Posted 21-May-12 3:35am
ns_27353
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

hi
i have done it in a project about 2 yrs before,
 
loop through each row then column in gridview
 
search for columns (cells) for starting value in ur case "a"
 
if current cell or column contain or starts with "a" just make this row selected (you have to set multiselect = true in gridview) and continue from the loop;
 
it might work.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Write a Select Query,
mSQL= "Select * From TableName Where ColumnName LIKE 'A%'";
Get this Data in a DataTable.
At last set
DataGridView.DataSource=DataTable.
Hope This Help
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

see this link you may get some idea
 
Search Engine – Windows Tool using C#[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 BillWoodruff 220
4 Mathew Soji 195
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,817
2 DamithSL 5,461
3 Manas Bhardwaj 4,946
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100