使用C#对DataGridView进行分组

编程入门 行业动态 更新时间:2024-10-26 08:28:23
本文介绍了使用C#对DataGridView进行分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { GridViewHelper helper = new GridViewHelper(this.dataGridView1); helper.RegisterGroup("Name", true, true); helper.ApplyGroupSort(); }

它给我:类型找不到名称空间名称'GridViewHelper'(你错过了使用指令或程序集引用吗?) 我想要有这样的: 10tec/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进行分组

本文发布于:2023-10-24 08:28:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1523446.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:DataGridView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!