Datagrid with virtualization calls for skipping a negative number

Hello, I am implementing a datagrid with virtualization. My page size is set to 40, and it appears to work great for result sets that are greater than 40. However, when a table only returns 7 rows for example, not only do the masked rows remain, but upon scrolling down, the Data manager makes a call to $skip=-33.

Since the initial dataset is less than the page size, shouldn't the masked rows go away? And if the masked rows are gone, that would prevent the execution of a bad query?

Code


Initial Query

https://localhost:44386/odata/ContactTypes?$count=true&$orderby=Id&$filter=(IsAvailable eq true)&$skip=0&$top=40


Initial Load


Then, when you scroll past the masked rows to invoke 2nd "page", it submits a bad query


Bad Query
https://localhost:44386/odata/ContactTypes?$count=true&$orderby=Id&$filter=(IsAvailable eq true)&$skip=-33&$top=40

Bad Results


Microsoft.OData.ODataException: Invalid value '-33' for $skip query option found. The $skip query option requires a non-negative integer value.
at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseSkip(String skipQuery)
at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseSkip()
at Microsoft.AspNet.OData.Query.SkipQueryOption.get_Value()

3 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team August 4, 2021 01:01 PM UTC

Hi Hank, 

Greetings from Syncfusion. 

Query: Datagrid with virtualization calls for skipping a negative number - Since the initial dataset is less than the page size, shouldn't the masked rows go away? And if the masked rows are gone, that would prevent the execution of a bad query? 

We have validated your query and we have already included the similar issue ”Cell placeholders are shown in the Virtualization Grid when the Grid having a small number of records” in 19.2.0.47 version. So could you please ensure the reported problem after upgrading your NuGet version to version 19.2.0.47 or latest version. 

Release notes:  

Please let us know if you have any concerns. 

Regards, 
Rahul 


Marked as answer

HC Hank Chadwick August 4, 2021 01:49 PM UTC

After upgrading from 19.2.0.46 to 19.2.0.51, my issues were solved. Thank you for your time.



RN Rahul Narayanasamy Syncfusion Team August 5, 2021 04:06 AM UTC

Hi Hank, 
 
Thanks for the update. 
 
We are happy to hear that the provided solution was helpful to resolve the problem. Please get back to us if you need further assistance. 
 
Regards, 
Rahul 


Loader.
Up arrow icon