Click here to Skip to main content
15,917,617 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Team,

I have DataGridView on Windows Form which get refreshed on Button Click Event.
I want to add Filter Capability to this GridView.
I have downloaded
DataGridViewAutoFilter
.dll from http://www.microsoft.com/en-us/download/details.aspx?id=23459[^]

But How do change column type to
DataGridViewAutoFilterTextBoxColumn
instead of default
DataGridViewTextBoxColumn
.

I have Below code on Button Click.
private void button1_Click(object sender, EventArgs e)
        {
            SqlConString = "Data Source=MyMachin-PC\\;Initial Catalog=MyDataBase;Persist Security Info=True;User ID=sa;Password=123456";
            MySqlCon.ConnectionString = SqlConString;
            MySqlCon.Open();
            SqlDataAdapter da = new SqlDataAdapter("Select * from Activity_Master", MySqlCon);
            DataTable dt = new DataTable();
            da.Fill(dt);
            bs.DataSource = dt;
            dataGridView1.DataSource = bs;            
        }

Please help!!!!!
Posted
Comments
firatbayram 15-May-15 8:39am    
i can not use with visualizers. i see standard datagridview in debug mode.

Hi,

To add the AutoFilter feature to your application programmatically

In your Windows Application project, add a reference to the "DataGridViewAutoFilter.dll" assembly. So download this dll from following link:

http://www.microsoft.com/en-us/download/details.aspx?id=23459[^]

It is working that's my experience for more information :

http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/53270637-9b01-46e2-9966-a2d9e03e8844[^]


using DataGridViewAutoFilter;


Regards,
Saurabh
 
Share this answer
 
v2
Hi, I already add reference. but I do not know how to use it? How I can set lenghth of filter? Or how I can set checkboxes on filter list? Please help me
 
Share this answer
 
Comments
AnvilRanger 1-Jan-16 17:16pm    
This question is almost 4 years old and has an accepted answer. Your post is not a solution in any form or fashion. If you have a question I suggest you ask it as a new question and delete this solution.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900