Hello,
Would be great to see DataTables sample with Search, Pagination in Blazor StarterKit
Main problem huge datasets loading - page halts
I found DataTables init in KTSubscriptionsList
Sample works, but on bigger data quantities halts:
private List<hotel> hotels { get; set; } = new List<hotel>();
protected override Task OnInitializedAsync()
{
hotels = db.hotel.Take(10000).ToList();
return base.OnInitializedAsync();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JS.InvokeVoidAsync("KTSubscriptionsList.init");
await JS.InvokeVoidAsync("KTSubscriptionsExport.init");
}
}
Hi,
Thank you for your feedback, we will consider adding this example in the next releases.
For the subscription list page, you should include and initialize the following js files.
assets/js/custom/apps/subscriptions/list/export.js
assets/js/custom/apps/subscriptions/list/list.js
Do you have any errors in your console?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hello,
At this moment no errors in console - everything seems to work smooth and fast
Main problem how to link DataTable with database
Search, pagination, next, first page, take(100)
Mix JS with c#
BR,
Saulius
Hi Saulius,
In our documentation, we have the DataTable Server Side example, you can refer to this example and reuse HTML and JS code in your project.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Make sure you have the necessary packages installed. You can install the Blazorise, Blazorise.Bootstrap, Blazorise.Icons.FontAwesome, and BlazorStrap packages. You can use the following NuGet Package Manager Console command:
Install-Package Blazorise.Blazorise
Install-Package Blazorise.Bootstrap
Install-Package Blazorise.Icons.FontAwesome
Install-Package BlazorStrap
install-Package poly track