Hi,
Ok but where do I set this VirtualItemCount property? I have tried but it made no difference.
Private Function GetParts() As System.Data.DataTable |
Dim DA190Component As New DA190Component() |
Dim table As System.Data.DataTable = Nothing |
|
Me.RadGrid1.VirtualItemCount = 360 |
|
'The code below calls my business object and returns only the number of records |
'as specified by the PageSize property of the rad grid - see parameters. |
|
table = DA190Component.GetDA190ComponentListView2(ViewState.Item(Constants.PAR_CERTIFICATE_NO), Me.RadGrid1.CurrentPageIndex, Me.RadGrid1.PageSize, ViewState.Item(Constants.PAR_MANAGE_PARTS_FILTER)) |
|
Return table |
End Function |
Now this function I call from the following places, so each time it needs data
like when paging occurs it fires the NeedDataSource event I pressume which in turn will call GetParts() which will ask the business objects for the next set of correct 15 or 10 records - depending on the PageSize (which is fixed at design time)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
If (Not IsPostBack) Then |
RadGrid1.DataBind() |
End If |
End Sub |
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource |
RadGrid1.DataSource = GetParts() |
End Sub |