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

Need datasource needs data base interaction every time on sorting and paging

2 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 20 Sep 2011, 05:50 AM
Hi Telerik,
I'm using Radgrid in my application.
I have one dount regarding radgrid needdatasource event.
Actually I'm binding the grid as follows

grid_needdatasource()
{
 bindgrid();
}
bindgrid()
{
//database intraction
grid.datasouce=dt;
}

Actually it will cal for databind,sorting and paging.
But everytime when we do sorting or paging this event will called and automatically bindgrid() method will call and it leads to database interaction agian. So every time when we do sorting or pagind its need database intraction. How to avoid this.
I think I have explored my doubt understandably.
please help me.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Sep 2011, 06:00 AM
Hello Ram,

This is the default behaviour of NeedDataSource,when using  NeedDataSource event, RadGrid can automatically accommodate the appropriate database operations without the need for you to explicitly handle any sorting, paging, grouping, and so on.

Thanks,
Shinu.
0
Ram
Top achievements
Rank 1
answered on 20 Sep 2011, 06:02 AM
Thanks for reply.
Tags
Grid
Asked by
Ram
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ram
Top achievements
Rank 1
Share this question
or