This is a migrated thread and some comments may be shown as answers.

set focus to a selected row in grid with scroll bars

2 Answers 300 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M Fries
Top achievements
Rank 1
M Fries asked on 19 Dec 2008, 11:53 PM
This is all happening serverside in an ajax postback.

We are adding a new item(obeject) to our datasource, then calling grid.rebind().
Next we call this to select and set focus:

            grdAsmt.MasterTableView.FindItemByKeyValue("guid", guid).Selected = true;
            grdAsmt.MasterTableView.FindItemByKeyValue("guid", guid).Focus();

When the ajax event comes back the item it select, but not focused.  The grid row is selected, but it is not visible and we have to manually scroll it to see it.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Dec 2008, 07:54 AM
Hi,

The following help article explains how to scroll to the selected item in Grid. Go through the following link and see if it helps.
Scrolling to the selected item

Shinu
0
M Fries
Top achievements
Rank 1
answered on 22 Dec 2008, 01:25 PM
Thanks that worked. I found some code like that earlier that did not work. This version was written much better and works. thanks again.
Tags
Grid
Asked by
M Fries
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
M Fries
Top achievements
Rank 1
Share this question
or