C#Winform使用DGV Filter在Datagridview中弹出插件 [英] C# Winform Using DGV Filter pop up plugin in Datagridview

查看:284
本文介绍了C#Winform使用DGV Filter在Datagridview中弹出插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,这是方案,我可以使用此代码在datagridview中显示弹出窗口



Form_Load

 DgvFilterManager fm =  new  DgvFilterManager(dataGridView1); 





For表

 MySqlCommand cmdDatabase =  new  MySqlCommand( 选择* 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);
//
}





它有效,现在我尝试使用(Designer)将一个Checkbox放在datagridview中,做完之后,我得到了错误:



 DgvFilterManager fm =  new  DgvFilterManager(dataGridView1); 





 '  System.NullReferenceException类型的未处理异常'出现  DGVFilterpopup.dll 

对象参考不< span class =code-keyword> set 到对象的实例





我希望这有助于 DataGridView过滤器弹出窗口 [ ^ ]



请帮忙,我需要DGV才能使用复选框

解决方案

为什么不问文章的作者?

他不太可能来这里看你的问题。



或者下载软件并对其进行调试。

如果构造函数中发生错误,那么找出哪个null为空的对象应该相当容易。

Hello, here's the scenario, i am able to show popup in datagridview using this code

Form_Load

DgvFilterManager fm = new DgvFilterManager(dataGridView1);



For the Table

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:

DgvFilterManager fm = new DgvFilterManager(dataGridView1);



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

解决方案

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.


这篇关于C#Winform使用DGV Filter在Datagridview中弹出插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆