开发者

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

开发者 https://www.devze.com 2023-04-02 12:00 出处:网络
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:

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

精彩评论

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

关注公众号