Wpf xceed数据网格滚动视图 [英] Wpf xceed data grid scroll view
本文介绍了Wpf xceed数据网格滚动视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我使用第20列时,我使用Xceed数据网格超过20列,并且在刷新滚动条后在我的网格中执行任何操作将自动从第1列开始,如何避免这样的刷新问题?
我用过这个代码
我试过的:
< xcdg:DataGridControl < span class =code-attribute> AllowDrop = True
< span class =code-attribute> AutoCreateColumns = False
ReadOnly = True
< span class =code-attribute>名称 = xcddgTst
< span class =code-attribute> ItemScrollingBehavior = 立即
MouseDoubleClick = xcddgTst_MouseDoubleClick
VerticalAlignment = 拉伸
Hori zontalAlignment = 拉伸 >
< xcdg:DataGridControl.Columns >
< xcdg:列 FieldName = Column01
ReadOnly = True
标题 = 第01列 >
< xcdg:Column.CellContentTemplate >
< DataTemplate >
< TextBlock 文本 = {Binding RelativeSource = {RelativeSource
AncestorType = {x :输入xcdg:DataRow}},
Path = DataContext [Column01],
StringFormat = \ {0:MM / dd / yyyy\}} / >
< / DataTemplate >
< / xcdg:Column.CellContentTemplate >
<! - < / xcdg:Column> ...... ....至第20栏 - >
< / xcdg:DataGridControl.Columns >
< / xcdg:DataGridControl >
解决方案
最好在中询问Xceed产品支持问题Xceed WPF控制论坛 [ ^ ]
I have use Xceed data grid with more than 20 columns when i use 20th column and do any action in my grid after refreshing the scrollbar will automatically start with column no 1 how to avoid such refreshing issue ?
I used this code
What I have tried:
<xcdg:DataGridControl AllowDrop="True"
AutoCreateColumns="False"
ReadOnly="True"
Name="xcddgTst"
ItemScrollingBehavior="Immediate"
MouseDoubleClick="xcddgTst_MouseDoubleClick"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<xcdg:DataGridControl.Columns>
<xcdg:Column FieldName="Column01"
ReadOnly="True"
Title="Column 01 ">
<xcdg:Column.CellContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding RelativeSource={RelativeSource
AncestorType={x:Type xcdg:DataRow}},
Path=DataContext[Column01],
StringFormat=\{0: MM/dd/yyyy\}}"/>
</DataTemplate>
</xcdg:Column.CellContentTemplate>
<!-- </xcdg:Column>.......... up to column20 -->
</xcdg:DataGridControl.Columns>
</xcdg:DataGridControl>
解决方案
You would be better off asking Xceed product support questions in the Xceed WPF controls Forum[^]
这篇关于Wpf xceed数据网格滚动视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文