If you data is very huge and you have to display in data grid or infragistics grid. There is one very simple solution to just go for paging.
Data grid provide a simple pager tag to allow paging, Just put inside the
<<DisplayLayout> tag and have the benefit of paging.
There is number of options you can define:
PageSize: Specify the number of results in page
PrevText: Specify Previous text
AllowCustomPaging: Specify the Custom paging – write your paging logic
PrevText: write the previous display test
StyleMode: Paging style mode – numeric , text etc
Code Snippet
- <Pager StyleMode="PrevNext" AllowPaging="True" PageSize PrevText AllowCustomPaging PrevText StyleMode >
- <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
- <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White">
- </BorderDetails>
- </Style>
- </Pager>
This is the simplest solution with large data displaying in one grid. However this method have a drawback, This method will call the database every time you click on the next or previous page. It means it will take same database time every time.
This method only reduces the binding time of grid and that is most important performance factor.
You can opt a Custom paging option to reduce database time.
I will come up with one more post demonstrating the Custom paging.