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

Scroll bar does not move with selected item

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hitesh
Top achievements
Rank 1
Hitesh asked on 02 Apr 2012, 06:01 PM
Hi,

I added a previous and next button outside of the grid as I wrote in this thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/add-previous-and-next-button-outside-of-grid.aspx

The previous and next button's work great.  But if the grid visible area shows 10 records and your grids page size is 50 then you have to scroll down to see the next records.   The problem is that once I'm on the 10th record and I click on the next button I go to the next record, but the scroll bar does not move with the selected record.  Is there a way to make the scrollbar move with the selected record in the grid?

My rad grid:
<telerik:RadGrid  ID="radGrid1" runat="server"
    AllowPaging="True" AllowSorting="True" CellSpacing="0" GridLines="None"
    AllowCustomPaging="True" PageSize="50"  Width="100%"
    Skin="Outlook" onneeddatasource="radGrid1_NeedDataSource"
        AutoGenerateColumns="False"  OnItemCommand="radGrid1_ItemCommand" OnPreRender="radGrid1_PreRender">
    <ExportSettings HideStructureColumns="true" />
    <ClientSettings>
    <Selecting CellSelectionMode="None" EnableDragToSelectRows="True"></Selecting>
        <Scrolling SaveScrollPosition="false"  AllowScroll="True" UseStaticHeaders="true" ScrollHeight="300px" />
    </ClientSettings>
    <MasterTableView>
 
    <Columns>
         <telerik:GridBoundColumn Visible="false" UniqueName="id"
             HeaderText="id" DataField="id">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="name"
            SortExpression="name" HeaderText="Name" DataField="name">
        </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Dob"
            SortExpression="Dob" HeaderText="DOB" DataField="Dob" DataFormatString="{0:MM/dd/yyyy}">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="Creation_date"
            SortExpression="Creation_date" HeaderText="Request Date" DataField="Creation_date" DataFormatString="{0:MM/dd/yyyy}">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="Status"
            SortExpression="Status" HeaderText="Test Status" DataField="Status">
        </telerik:GridBoundColumn>
    </Columns>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true"   Selecting-AllowRowSelect="true" AllowKeyboardNavigation="true"  />
</telerik:RadGrid>


Thank you,
-Hitesh

1 Answer, 1 is accepted

Sort by
0
Hitesh
Top achievements
Rank 1
answered on 02 Apr 2012, 06:20 PM
I just found this and it works great.

http://www.telerik.com/help/aspnet-ajax/grid-scroll-to-selected-item.html
Tags
Grid
Asked by
Hitesh
Top achievements
Rank 1
Answers by
Hitesh
Top achievements
Rank 1
Share this question
or