문제

I have a GridControl of DevExpress. I want the Focus on particular row according the Id which I entered in the textbox above the GridControl.

For example, if I enter 10 in textbox then in the gridCOntrol the row having Id = 10 got focused.

도움이 되었습니까?

해결책

This can be done using the following code:

    int rowHandle = gridView1.LocateByDisplayText(0, gridView1.Columns["Id"], "10");
    if(rowHandle != GridControl.InvalidRowHandle)
        gridView1.FocusedRowHandle = rowHandle;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top