如何同步的DataGridView和数据源,当用户进行排序的列?

编程入门 行业动态 更新时间:2024-10-17 04:40:20
本文介绍了如何同步的DataGridView和数据源,当用户进行排序的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个直接通过一个SqlDataAdapter绑定到数据集Windows窗体项目一个DataGridView。我有一个可编辑的列其中用户可以编辑,如果用户不列进行排序的伟大工程。

I have a DataGridview in a windows form project that is directly bound to a Dataset through a SqlDataAdapter. I have one editable column which a user can edit and that works great if the user does not sort the column.

如果用户一起排序什么的DataGridView显示的是底层的数据源得到同步的列。

If the user sorts the column the underlying datasource gets out of sync with what the Datagridview is displaying.

什么是标准的技术来保持GridView和数据源同步,当用户进行排序?

What is a standard technique to keep the gridview and datasource in sync when a user sorts it?

谢谢!

推荐答案

我似乎无法找到触发了点击标题排序一个DataGridView的事件。

I can't seem to find an event that triggers for clicking on the header to sort a datagridview.

更多推荐

如何同步的DataGridView和数据源,当用户进行排序的列?

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

发布评论

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

>www.elefans.com

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