使用C#对DataGridView进行分组 [英] Grouping the DataGridView using C#

查看:139
本文介绍了使用C#对DataGridView进行分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
       {


           GridViewHelper helper = new GridViewHelper(this.dataGridView1);
           helper.RegisterGroup("Name", true, true);
           helper.ApplyGroupSort();
       }









它给我:类型找不到名称空间名称'GridViewHelper'(你错过了使用指令或程序集引用吗?)





我想要有这样的:



http://10tec.com/articles/screenshots/datagridview-grouping-with-datagridviewgrouper-component.png [ ^ ]

推荐答案

你需要让班级 GridViewHelper 在您的项目中引用,作为源代码文件或引用的程序集。



如果没有该类,则为死在水里。



我猜你从这里得到了示例代码 C#/ VB.NET中的DataGridView分组:两个食谱 [ ^ ],但似乎您所喜欢的组件的链接已损坏。



也许你可以使用其他一个例子。
You need to have the class GridViewHelper referenced in your project, either as a source code file or as a referenced assembly.

Without that class you are dead in the water.

I guess you got the example code from here DataGridView Grouping in C#/VB.NET: Two Recipes[^], but it seems like the link to the component you like is broken.

Maybe you can use one of the other examples.


这篇关于使用C#对DataGridView进行分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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