如何同步的DataGridView和数据源,当用户进行排序的列? [英] How to sync Datagridview and datasource when user sorts column?

查看:100
本文介绍了如何同步的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和数据源,当用户进行排序的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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