We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Not Loading Last Item From List

I updated to the latest version of the Grid control but I am now experiencing an unusual issue that didn't exist before.

I am dynamically updating the list of object in the grid passed on user input.  However, I have noticed that it isn't showing all the items in the list object, although it seems to detect them.  So the footer of the grid will say (2 item) but in the grid itself it will only show the first item.  If there is only one item in the list, the footer will say (1 item) but not show anything in the grid.

1 Reply

RN Rahul Narayanasamy Syncfusion Team August 14, 2019 01:07 PM UTC

Hi Dominick, 
 
Greetings from Syncfusion. 
 
Query: Not Loading Last Item From List (So the footer of the grid will say (2 item) but in the grid itself it will only show the first item.  If there is only one item in the list, the footer will say (1 item) but not show anything in the grid.) 
 
We have validated your query and checked the reported problem by creating a sample based on your suggestion. It works fine at our end. Here, we have load grid dataSource dynamically by using button click. Please find the below code example and sample for your reference. 
 
[code example] 
... 
 
<EjsButton @onclick="@Click">Load Data</EjsButton> 
<EjsGrid @ref="@Grid" DataSource="@Orders" AllowPaging="true"> 
    <GridPageSettings PageCount="2"></GridPageSettings> 
    <GridColumns> 
        ... 
   </GridColumns> 
</EjsGrid> 
 
@code{ 
... 
 
private void Click(UIEventArgs args) 
{ 
    Orders = Enumerable.Range(1,2).Select(x => new Order() 
    { 
        OrderID = 1000 + x, 
        ... 
   }).ToList(); 
} 
protected override void OnInit() 
{ 
    Orders = null; 
} 
 
... 
} 
 
 
[screenshot] 
 
 
 
 
If you are still facing the same problem, could you please share the below details. It will be helpful to provide a better solution. 
 
  • Share full grid code snippets.
  • Share NuGet package version details.
  • Share details about how you are bind dataSource dynamically to the grid?
  • Reproduce the reported problem in the provided sample if possible.
 
Regards, 
Rahul 


Loader.
Up arrow icon