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

[Solved] Loading data when user scrolls

2 Answers 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dsoltesz
Top achievements
Rank 1
dsoltesz asked on 17 Mar 2009, 09:54 PM
I was using a standard grid and subscribing to the LoadingRow event.  When the user scrolled and more data was going to be displayed in the grid, the LoadingRow event would fire and I could fetch more data.  I do not see any events in the telerik grid that lets you know when a row is going to load, just an event that says the row actually loaded.  Is there a similar event in the telerik grid that would mimic the standard LoadingRow event in the standard silverlight grid?

 

2 Answers, 1 is accepted

Sort by
0
dsoltesz
Top achievements
Rank 1
answered on 17 Mar 2009, 09:58 PM
Standard grid and events

this.m_MyDataGrid.LoadingRow += new EventHandler<DataGridRowEventArgs>(m_MyDataGrid_LoadingRow);

 


 

private void m_MyDataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            if (loading || positions.Count < _endRow)
            {
                return;
            }
            if (positions.Count - 5 < e.Row.GetIndex())
            {
                GetData(_startRow, _endRow);
            }

        }

Very easy to load data on demand as the user scrolls, the Loading row event will fire and we can see if we need more data

0
Nedyalko Nikolov
Telerik team
answered on 19 Mar 2009, 06:25 PM
Hello dsoltesz,

We actually do not have such event, but for your scenario I think this blog post is what you need.

All the best,
Nedyalko Nikolov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
dsoltesz
Top achievements
Rank 1
Answers by
dsoltesz
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or