C# 使用 devexpress gridcontrol 的最佳方式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10193149/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 12:49:25  来源:igfitidea点击:

Best way to use devexpress gridcontrol

c#winformsdevexpress

提问by thiago

I'm using devexpress for a windows form project, i'm came from web developing (classical asp.net applications), and i need to know if what i doing is that right way. First of all, i'm using de gridcontrol to make a CRUD, but exists a better way to insert/delete rows? I'm using a List, to add/delete rows on it and update the datasource to the gridview.

我正在将 devexpress 用于 Windows 窗体项目,我来自网络开发(经典的 asp.net 应用程序),我需要知道我所做的是否正确。首先,我正在使用 de gridcontrol 来制作 CRUD,但是否存在更好的插入/删除行的方法?我正在使用一个列表,在它上面添加/删除行并将数据源更新到 gridview。

Sorry for the poor english :)

抱歉英语不好:)

采纳答案by DmitryG

The better way is strongly depends on your tasks. Anyway you can starts here:

更好的方法很大程度上取决于您的任务。无论如何,您可以从这里开始:

P.S. I suggest you use the DevExpress Support Centerto get official and guaranteed assistance on the use of DevExpress products. Note that FULL SUPPORT IS FREE during the evaluation period (30 days)

PS 我建议您使用DevExpress 支持中心获得有关使用 DevExpress 产品的官方和有保证的帮助。请注意,在评估期间(30 天),完全支持是免费的

回答by john

The most accurate way to update data in this scenario is to use the GridView.RowUpdated event. Just handle this event and update only necessary rows. Is this approach useful for you? I am looking forward to your response.

在这种情况下更新数据的最准确方法是使用 GridView.RowUpdated 事件。只需处理此事件并仅更新必要的行。这种方法对你有用吗?我期待着您的回复。

https://www.devexpress.com/Support/Center/Question/Details/Q478681/best-way-to-update-a-gridview

https://www.devexpress.com/Support/Center/Question/Details/Q478681/best-way-to-update-a-gridview