how to set focus row on XtraGridControl Devexpress?

NoName picture NoName · Apr 17, 2014 · Viewed 9.1k times · Source

I have a list items to show on XtraGridControl. I want first item of the grid controll, which is always chosen when I sort by any column. I tried to find and use FocusedRowHandle property, but there is not.

What properties I can use to focus the first item on XtraGridControl programly?

Thanks advance.

Answer

NoName picture NoName · Apr 18, 2014

I solve the problem myself by using ColumnView as code below:

ColumnView cv = m_wndGridCtrl.MainView as ColumnView;
cv.FocusedRowHandle = 0;

Thanks for your time supporting.