开发者

How to set focus to particular row in Xceed Grid for .NET

I am new to using Xceed Grid for .NET. There is set focus in .NET but not on Xcee开发者_开发知识库d. Can you please help me how to get the same ?


You can do the following:

this.gridControl1.CurrentRow = this.gridControl1.DataRows[100];
this.gridControl1.CurrentRow.BringIntoView();
this.gridControl1.FirstVisibleRow = this.gridControl1.CurrentRow;
this.gridControl1.SelectedRows.Add(this.gridControl1.CurrentRow);

Calling the BringIntoView on the DataRow will let the GridControl scroll all the way to where the DataRow is located. Setting the FirstVisibleRow on the GridControl to your CurrentRow will have the DataRow at the top of the GridControl's view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜