如何保存WPF Datagrid布局? [英] How to save WPF Datagrid layout ?
本文介绍了如何保存WPF Datagrid布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
DataGrid控件不可序列化.因此,我正在尝试找出最佳和快速的解决方案,以将DataGrid布局(列顺序,可见性,宽度等)保存到带有w.e的DB.ini文件中.
最好的答案是工作演示^ _ ^
THX伙计们!
Hi !
DataGrid controll is not serializable. So im trying find out the best and quick solution to save DataGrid Layout (column order, visibility,width,...) to DB, .ini file w/e.
Best answer is working demo ^_^
THX guys!
推荐答案
您可能会做几件事.看看这里的例子:
http://social.msdn.microsoft.com/Forums/zh/winformsdatacontrols/thread/b8c2f423-9715-4d9e-b661-690fdb530a59 [
There are a couple of things you coul ddo. Take a look at the example here:
http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/b8c2f423-9715-4d9e-b661-690fdb530a59[^]
Otherwise you could use Reflection and loop through all the propertiues and store them in a text or xml file.
这篇关于如何保存WPF Datagrid布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文