How to show isLoading on DataGrid

There is no isLoading property anywhere in DataGrid, how we can achieve this functionality

Dear @qmmughal,

Alternatively, use LoadData. Inside the event, at the beginning, assign the IsLoading variable to the "true" and at the end, "false".

And use the IsLoading variable to hide or show the panel with the loader.

   async Task LoadData(LoadDataArgs args)
    {

        IsLoading = true;

        var query = dbContext.Employees.AsQueryable();

        if (!string.IsNullOrEmpty(args.Filter))
        {
            query = query.Where(args.Filter);
        }

        if (!string.IsNullOrEmpty(args.OrderBy))
        {
            query = query.OrderBy(args.OrderBy);
        }

        employees = query.Skip(args.Skip.Value).Take(args.Top.Value).ToList();

        count = dbContext.Employees.Count();

        IsLoading = false;

        await InvokeAsync(StateHasChanged);
    }
1 Like

It may be useful:

https://forum.radzen.com/t/loader-in-radzen/5301?u=agefer

1 Like

Indeed, I'd found this: Global Properties in Templates?

Slosuenos

1 Like

Thank you Guys, I was just checking if we have isLoading option still in DataGrid. I resolve this logic with custom spinner logic.

1 Like

Hi do you have link or docs for custom spinner please? Thanks