首页 > 软件网络

int index = dataGrid1.SelectedIndex; //当前行号

时间:2017-01-11  来源:  作者:

WPF 获取DataGrid 选中行的行号 及改变 选中行的背景色..._新浪博客

int index = dataGrid1.SelectedIndex; //当前行号 var row = dataGrid1.ItemContainerGenerator.ContainerFromItem ( dataGrid1.Items[index] ) as DataGridRow; row...

c#wpf获取DataGrid值 - 博客频道 - CSDN.NET

name="rowIndex">行索引 /// 列索引 /// <returns></returns> private DataGrid...(dataGrid1.SelectedItems.Count > 0) { int i = dataGrid1.SelectedInde...

Silverlight怎么屏蔽datagrid按回车自动到下一行这个动..._百度知道

int _index = dataGrid1.SelectedIndex; if ((_index != 0) && (_index != 9)) _index--; dataGrid1.SelectedIndex = _index; } 这段代码虽然管用,但...

DataGrid跳转到某一行,该如何处理 - Silverlight

问题如下: 我的DataGrid数据很多,我想通过输入行号index 来直接跳到某一行,并在UI上可以自动定位并且可以看到(不需要拖动滚动条) ! DataGrid.SelectedIndex 只能让...

DataGrid跳转到某一行,该如何处理_IT知识问答_希赛网

问题如下: 我的DataGrid数据很多,我想通过输入行号index 来直接跳到某一行,并在UI上可以自动定位并且可以看到(不需要拖动滚动条) ! DataGrid.SelectedIndex 只能让...

获取DataGridView控件中某行的行号 - C# 论坛 - 编程论坛

的行号是这么写的:int index=dataGrid1.CurrentCell...DataGridView1.selecteditem[0].index 曾经有双翅膀...必须为非负值并小于集合大小 参数名 index; 大家...

WPF DataGrid Current Row Index

row index, I tried with DataGrid.SelectedIndex but it always returns -1....public static int GetRowIndex(DataGridCell dataGridCell) { // Use reflection...

求助:DataGridView中如何获取一次性选择多行的行号?-CS..._CSDN论坛

.CurrentCell.RowIndex;是当前活动的单元格的行号...datagridview.SelectedCells 是选中单元格的集合 DataGridView...Index + i + 1).ToString(); } for (int i...

c# - WPF DataGrid Remove SelectedItems - Stack Overflow

for (int i = -datagrid1.SelectedItems.Count; i < datagrid1.SelectedItems.Count; i++) { datagrid1.SelectedItems.RemoveAt(datagrid1.SelectedIndex); } ...

GridView 如何获取当前行的索引值 - Makenna‘s Eye - ITeye技术...

lbtnQianChu.SelectedIndex = gvr.RowIndex; ...//行号 int row = ((GridViewRow)((LinkButton)...单例模式测试类 | DataGrid和DropDownList的一些配合...
来顶一下
返回首页
返回首页
栏目更新
栏目热门