Click here to Skip to main content
15,908,445 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, here's the scenario, i am able to show popup in datagridview using this code

Form_Load
C#
DgvFilterManager fm = new DgvFilterManager(dataGridView1);


For the Table
C#
MySqlCommand cmdDatabase = new MySqlCommand("Select * from del", con);
{
   MySqlDataAdapter sda = new MySqlDataAdapter();
   sda.SelectCommand = cmdDatabase;
   System.Data.DataTable dbdataset = new System.Data.DataTable();
   sda.Fill(dbdataset);
    BindingSource bSource = new BindingSource();
    bSource.DataSource = dbdataset;
    dataGridView1.DataSource = bSource;
     sda.Update(dbdataset);
 //
 }


And it works, now i tried to put a Checkbox in the datagridview using (Designer) , after doing it, I got Error:

C#
DgvFilterManager fm = new DgvFilterManager(dataGridView1);


C#
An unhandled exception  of type 'System.NullReferenceException' occurent in DGVFilterpopup.dll

Object reference not set to an instance of an object


I hope this helps DataGridView Filter Popup[^]

Please help, i need the DGV to work with checkbox please
Posted
Updated 2-Dec-15 17:06pm
v2
Comments
Garth J Lancaster 2-Dec-15 23:49pm    
does it work if you have a bool true/false column/value in your dataset ? my worry is by adding a checkbox column using designer, Vincenzo's lovely work may not work on an 'unbound' column. If it does work with the bool true/false value in your dataset, then a work-around is possible

1 solution

Why not ask the author of the article?
It is less likely he will come by here and see your question.

Or download the software and debug it.
If the error happens in the constructor, it should be fairly easy to find out which object that is null.
 
Share this answer
 
Comments
Rencyrence 3-Dec-15 0:17am    
It seems that the author is no longer supporting, i was able to do this finally, thanks for reminding me
George Jonsson 3-Dec-15 0:22am    
You are welcome.

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