I have a DevExpress Grid View with 3000 lines and each line has 10 as detail (it means when the grid load I have 30000 items to load)
It takes a long time to load all of the data, so is there any way to show for example 100 line, and when the user use the automatic filter I show the desired rows?.
Example http://demos.devexpress.com/aspxgridviewdemos/filtering/filterrow.aspx
I tried to use the Skip and Take (using LINQ) but it's not really what I'm looking for, in addition to that I would like to use the automatic filter of the grid.
public static BindingList<patient> getObjectUsingLinq(string sql = "", int skipCount = 0, int takeCount = 0)
{
var gsData = GetDataContext();
var query = (from q in gsData.patient
orderby q.nom
select q);
return new BindingList<patient>(LinqHelper.DoSortPaginate(query, "", skipCount, takeCount).ToList());
}
and to bind this to the Grid I call
listPatient = Patients.getObjectUsingLinq();
myGrid.DataSource = listPatient ;