We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,524 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Need Help :Complex filtering datagridview items

i wanna search items like MS windows search for example if i wanna search mp4 files i should write "*.mp4" its enough my searching
but if i ll use filter function i cant do this on datagridview couse when i want to search something i need to know full name of this record... its to bad for me...

is there any way ?
can i do it?

Thx for Answers :)

2
Contributors
2
Replies
10 Months
Discussion Span
10 Months Ago
Last Updated
3
Views
Question
Answered
Oneryavuz
Junior Poster in Training
70 posts since Jul 2011
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0

Something like this?

I presume you are connecting a DB of some sort.

Dim ds As New DataSet

'oData is just an interface which contains my connection strings

ds = oData.GetSQL("SELECT * FROM [TableName] WHERE " & cbFilter.Text & " LIKE '%" & txtSearch.Text & "%'"

For Each dr As DataRow In ds.Tables(0).Rows
'poplate gridview
next
Techyon
Light Poster
25 posts since Apr 2010
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0
    Dim dv As New DataView(DbDataSet.Tables("Table1"))
    dv.RowFilter = "Column1 Like '" & TB_Anything.Text & "%'  OR column2 Like '" & TB_Arama.Text & "%' "
    ''the most important think is % operator its like search on windows "*.avi" %=*
    DataGridView1.DataSource = dv '' so u can see your filtred results

thx for techyon to help :)

Oneryavuz
Junior Poster in Training
70 posts since Jul 2011
Reputation Points: 10
Solved Threads: 3
Skill Endorsements: 0
Question Answered as of 10 Months Ago by Techyon

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.1296 seconds using 2.68MB