private void Grid1_CurrentCellChanged(object sender, System.EventArgs e)
{
int tpRowNum = Grid1.CurrentCell.RowNumber;
RowNum=-1;//解决一行数据选择问题
if(tpRowNum!=RowNum)
{
RowNum =tpRowNum;
}
//实现行选
Grid1.CurrentRowIndex=RowNum;
Grid1.Select(RowNum);
}
{
int tpRowNum = Grid1.CurrentCell.RowNumber;
RowNum=-1;//解决一行数据选择问题
if(tpRowNum!=RowNum)
{
RowNum =tpRowNum;
}
//实现行选
Grid1.CurrentRowIndex=RowNum;
Grid1.Select(RowNum);
}
解决方案 »
- 网上找了一段代码,利用MemoryStream来存储分块的数据包,将其转换成为byte[]后,所有字节都为0,请问是什么缘故呢?
- ado.net中,连接对象何时能够手动open/close,何时可以自动的open/close呢?有一定的约定吗?
- c# 读excel的方法
- .NET程序使用HTTP协议与Web Serverlet交互数据
- 资源如何使用?
- 100分 zedgraph横坐标问题
- C#多线程-界面-不能在控件上调用Invoke或BeginIn
- 新手请教:我要做一个往票据的指定位置用针式打印机打印指定内容的程序,祥细见内!
- Gmail中用到的这个控件叫啥呢?WPF中能不能做到呢?
- 急!急!急!一个简单的打印功能
- c#在window 2000 中怎样获得当前用户的Application Data文件夹位置
- 在用户控件里面分页的问题...
{
this.dataGrid1.Select(this.dataGrid1.CurrentRowIndex);
}
private void dataGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
Point pt = new Point(e.X,e.Y);
DataGrid.HitTestInfo hit = dataGrid1.HitTest(pt);
if(hit.Type == DataGrid.HitTestType.Cell)
{
dataGrid1.Select(hit.Row);
}
}
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp