Declined
Last Updated: 10 May 2024 09:52 by ADMIN
Scott
Created on: 22 Apr 2024 18:50
Category: Grid
Type: Feature Request
1
Loading and No Data Template Timing

On grids with a lot of data there is a delay between when the grid is assigned the data to when the grid shows the data.  During this UI painting period, the NoDataTemplate is displayed for a second or two.

The grid should not show the NoDataTemplate unless the data source is loaded with an empty collection, not just while it is still trying to show the data.

Note: Having a generic message like in the documentation "No Data available / The data is still loading ..." is not satisfying our users. (Blazor Grid - No Data Template - Telerik UI for Blazor) These should really be two different states that can show different messages.

Thanks

5 comments
ADMIN
Nadezhda Tacheva
Posted on: 10 May 2024 09:52

Hi Scott,

Thank you for your patience! I am following up with an update after we have discussed the request with the team.

We've considered the following points:

  • The Grid does not control when the data requests are made, how much time they will take and if they will return any records. Thus, for the component "no data" and "data loading" states are not different. It does not know if data is currently loading and it only knows that it currently does not have data to show. Managing these states is up to the application.

  • Your suggestion for showing the LoadingDataTemplate when the bound data is null and the NoDataTemplate when it is empty is indeed valid. However, this implies that one should initialize the page with data collection that is null in order to show the LoadingDataTemplate. Thus, we would be imposing a required code style for our users which is not desired - a lot of people are instantiating empty collections.

  • Having a dedicated LoadingDataTemplate would not make the implementation of the desired result easier compared to the current proposed approach with conditional rendering in the NoDataTemplate.

Having the above in mind, we've decided to not move forward with a LoadingDataTemplate and I am now marking the request as declined.

Regards,
Nadezhda Tacheva
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
ADMIN
Hristian Stefanov
Posted on: 06 May 2024 10:08

Hi Scott,

Thank you for giving us feedback and providing additional information on the topic.

This week we will discuss it with the team and update the status of the item.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Scott
Posted on: 29 Apr 2024 15:29
Yes, I think that would work.  In an ideal scenario, what I would like to see is the grid determine this state by showing the LoadingDataTemplate when the bound data is null and the NoDataTemplate when it is empty.  If a grid does not have a LoadingDataTemplate is would work exactly like it does today, so as not to break existing implementations.  This would save repeating the no records logic in every grid loading scenario.

Thanks for the solution.  Can we leave this open as a feature request instead of a bug report?

    <NoDataTemplate>
            <strong>No Data available</strong>

    </NoDataTemplate>

    <LoadingDataTemplate>
            <strong>The data is still loading...</strong>
    </LoadingDataTemplate>


ADMIN
Nadezhda Tacheva
Posted on: 29 Apr 2024 09:37

Hi Scott and Thomas,

Thank you for your suggestion! I do agree that these are different scenarios - when the Grid has an empty collection and when it is currently waiting to receive the items to display. However, both of these fall under the "no data" category and let me provide some clarification.

By specification, the NoDataTemplate is rendered when the Grid has no data to show. The data requests are made outside of the Grid and thus the Grid has no control over when the items will arrive or even if any items will arrive. In other words, one can make a request to their datasource to fetch the needed data and this may indeed take a while. The key point is that at this stage, the only information that the Grid has is that there are currently no items to show. It is up to the application to manage what will be displayed in the NoDataTemplate based on whether a request is made and the data is awaited or if there are no records to display at all.

Having the above in mind, you can conditionally control the NoDataTemplate content rendering. Here is a basic example: https://blazorrepl.telerik.com/weEeQDut33qz02hu56.

Can you think of any scenario that cannot be covered with this approach? If so, please share a runnable example and I will revise it with the dev team.

Regards,
Nadezhda Tacheva
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Thomas
Posted on: 29 Apr 2024 07:42
I agree, a simple and easy to implement improvement to the grid.