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

yahoo scrolling with gridview

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
daren
Top achievements
Rank 1
daren asked on 10 Jun 2015, 12:32 PM

Hi,

Is it possible to use the arrow keys on a keyboard to do a yahoo style scrolling on the radgrid when there is already a scroll bar implemented on the main page?

 

for instance:

 

main page needs a scroll bar because of the size.

rad grid will need a scroll bar

auto scrolling is set to true

page posts back during scrolling with mouse

must be able to use arrow keys for scrolling

 

Even in the examples on your pages I have noticed that you cant use the arrow keys with the scroll bars.  Is this the norm or am i missing something?

 

thanks

daren

 

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 15 Jun 2015, 07:30 AM
Hello Daren,

In order to enable the arrow keys to scroll the content of the grid, you need to enable its Scrolling, Keyboard Navigation and Row Selection functionalities. Following is a simple example of a grid that will allow you to use the arrow keys for moving through items and scroll the content (when there is a selected item or when the grid is on focus):
<telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" ClientSettings-Scrolling-AllowScroll="true"
    ClientSettings-Selecting-AllowRowSelect="true">
    <ClientSettings AllowKeyboardNavigation="true">
    </ClientSettings>
</telerik:RadGrid>

And the dummy data:
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    DataTable table = new DataTable();
    table.Columns.Add("ID", typeof(int));
    table.Columns.Add("BoolValue", typeof(Boolean));
    for (int i = 0; i < 500; i++)
    {
        table.Rows.Add(i, i % 2 == 0);
    }
 
    (sender as RadGrid).DataSource = table;
}

Hope this helps.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
daren
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or