以编程方式将 Datagrid 列置于视图中(水平滚动) [英] Programatically bringing a Datagrid column into view (horizontal scroll)

查看:25
本文介绍了以编程方式将 Datagrid 列置于视图中(水平滚动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以编程方式显示一列.我有很多列,当它们在屏幕外时,我想选择一个单元格并将该单元格置于视图中,我可以选择一个屏幕外的单元格,当我水平滚动以使该单元格可见时,该单元格被选中.

I would like to bring a column into view programatically. I have a lot of columns and when they are off screen i would like to select a cell and bring that cell into view, i can select a cell that is off screen and when i horizontal scroll to bring the cell visible the cell is selected.

我知道你可以用行来做到这一点,即 ScrollIntoView 但列呢?

i know you can do this with the rows, i.e ScrollIntoView but how about columns?

有人有幸这样做过吗?如果是这样:)(当然)

anyone had any luck doing this? and if so how :) (of course)

推荐答案

答案:使用 datagrid 方法.

Answer : use the datagrid method.

public void ScrollIntoView(object item, DataGridColumn column);

需要一列.很简单.

这篇关于以编程方式将 Datagrid 列置于视图中(水平滚动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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