ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Areas/Admin/Views/Shared/Components/CommonPopularSearchTermsReport/Default.cshtml
@{
    var gridPageSize = 4;
}
<div id="search-term-report-grid"></div>
<script>
    $(document).ready(function () {
            $("#search-term-report-grid").kendoGrid({
                dataSource: {
                    transport: {
                        read: {
                            url: "@Html.Raw(Url.Action("PopularSearchTermsReport", "Reports"))",
                            type: "POST",
                            dataType: "json",
                            data: addAntiForgeryToken
                        }
                    },
                    schema: {
                        data: "Data",
                        total: "Total",
                        errors: "Errors"
                    },
                    error: function(e) {
                        display_kendoui_grid_error(e);
                        // Cancel the changes
                        this.cancelChanges();
                    },
                    pageSize: @(gridPageSize),
                    serverPaging: true,
                    serverFiltering: true,
                    serverSorting: true
                },
                pageable: {
                    refresh: true
                },
                editable: {
                    confirmation: false,
                    mode: "inline"
                },
                scrollable: false,
                columns: [{
                    field: "Keyword",
                    title: "@T("Admin.SearchTermReport.Keyword")"
                }, {
                    field: "Count",
                    width: 50,
                    title: "@T("Admin.SearchTermReport.Count")"
                }]
            });
        });
</script>