在wpf datagrid中冻结列 [英] Freezing columns in wpf datagrid
问题描述
现在,我正在使用两个不同的DataGrids,其中最右侧的DataGrid与滚动浏览器中的最右侧的数据网格水平滚动,垂直滚动关闭。我也必须同步两个排序目的或禁用排序。
好的,这个控件很简单,所有你需要做的是设置FrozenColumnCount =6,在我的情况下。也许别人会需要这个,他们可以笑我的愚蠢。
I have some tabular data which has a lot of fields in it, and when my WPF application is resized a lot of them are cut off. However, I want to see the first 6 columns always as they are important. How can I achieve this in a grid format? I am using the WPFToolkit DataGrid but can be persuaded to change to a different control if one exists.
Right now, I am using two different DataGrids side by side with the right most datagrid inside a scrollviewer with horizontal scrolling on and the vertical scrolling off. I will also have to either sync the two for sorting purposes or disable sorting altogether.
Okay, it's trivial in that control, all you have to do is set FrozenColumnCount = "6", in my case. Maybe someone else will need this and they can laugh at my stupidity.
这篇关于在wpf datagrid中冻结列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!