Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
Virtual Scrolling
posted

I just downloaded the 2011 vol 1 trial to determine if we can take advantage of your controls and i am having a tough time getting it working right.

I am currently tryint to do virtual scrolling and it seems it only allows me to scroll to the visible rows x row factor and then it goes blank if I scroll beyond that.  So my view is 15 rows and factor is 3 then i can scroll to row 45 and then it goes blank if i scroll beyond that.  i am not sure if there is somethign i am not doing correct.  the samples out there seem pretty straight forward so maybe i am just missing something.  I am binding this to a data source at a click of a search.  here is my code.

.aspx

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<

 

 

ig:WebDataGrid ID="gridCustomerSearch" runat="server" Height="350px"Width="600px" AutoGenerateColumns="False" DataKeyFields="CustomerID"><Columns>

 

 

 

<ig:BoundDataField DataFieldName="CustomerID" Key="CustomerID"><HeaderText="CustomerID" />

 

 

 

</ig:BoundDataField>

 

 

 

<ig:BoundDataField DataFieldName="CompanyName" Key="CompanyName"><HeaderText="Name" />

 

 

 

</ig:BoundDataField>

 

 

 

</Columns>

 

 

 

<Behaviors>

 

 

 

<ig:VirtualScrolling Enabled="true" RowCacheFactor="3" ScrollingMode="Deferred" TooltipVisibility="NotSet" ThresholdFactor=".5"></ig:VirtualScrolling>

 

 

 

</Behaviors>

 

 

 

</ig:WebDataGrid>

.vb to retrieve the data

Private

 

 

Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click

Dim daCust As New EmunWorks.DataAccess.CustomersDB

 

 

Dim arrCust As EmunWorks.Info.CustomersInfo()

arrCust = daCust.GetCustomerByName(

 

Me.txtFindCustomer.Text, False)

lblRecordCount.Text = arrCust.Count

gridCustomerSearch.DataSource = arrCust

gridCustomerSearch.DataBind()

 

 

End Sub

Any help would be appreciated,

Sy

Parents
  • 49378
    posted

    Hi saevar,

    It has been some time since your post, however in case you still need assistance I would be glad to help.

    When you are using behaviors (sorting, filtering, virtual scrolling) the grid needs to be rebound to its datasource on each postback. In your case you are binding the grid upon a button click and on the postback generated by the VirtualScrolling behavior no data is effectively found for the grid. Ensuring that the grid is data bound on each postback should therefore resolve the behavior.

    Please let me know if you have any questions.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Reply Children
No Data