I am relatively new to Kendo. I have a question is it possible to get the count of selected rows in a column and added it to the paging bar? If so how? I have highlighted the area in a screenshot.
Once the dataBound event is triggered, the following code is executed. It adds a DOM element after the pager of the Grid.
var pagerElement = this.pager.element;
if (!pagerElement.find(".myCustomElement").length) {
pagerElement
.append('<div class="myCustomElement">No rows are selected</div>');
}
Once a user selects a row in the Grid, the below code is executed.
var rows = e.sender.select();if(rows.length !== 0){
$(".myCustomElement").text("Number of selected elements: " + rows.length)
}
else {
$(".myCustomElement").text("No rows are selected")
}
Based on the code in yellow, the text inside our custom element is changed. The code in green uses the select method of the Grid to get the currently selected rows.
I hope the example demonstrates what you want to implement.
Regards,
Petar
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.