Link to home
Start Free TrialLog in
Avatar of PSERS BIT
PSERS BITFlag for United States of America

asked on

Filtering a GridView Control

I would like to add a filter for a Gridview Control in VB.Net 2012.  What is the best solution in doing this?

Thank you!
Avatar of DevAdmin
DevAdmin
Flag of Italy image

What is the datasource of the grid? how you use the datagrid in unbound mode or not?
Avatar of PSERS BIT

ASKER

Ermanno,

I'm sorry for not being more specific, the data source is SQL.   Datagrid is a bound control.
An easy way is use the Filter Property of the BindingSource object:
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.bindingsource.filter
Thank you, do you have the solution in vb.net?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.