Telerik Forums
Kendo UI for jQuery Forum
3 answers
109 views

<div id="grid"></div>

<script>
    function LoadGrid() {
        var Installments = $("#TxtInstallments").val();
        var LoanAmount = $("#TxtLoanAmount").val();
        var OutStandingInstallments = $("#TxtOutStandingInstallments").val();
        var LoanFormula = $("#TxtLoanCodeFormula").val();
        var LoanInterestRate = $("#TxtLoanInterestRate").val();
        var DeductionStartPeriod = $("#TxtDeductionStartPeriod").val();
        var DeductionStartYear = $("#TxtDeductionStartYear").val();

        $("#grid").kendoGrid({
            dataSource: {
                transport: {
                         read: {
                            data: { Installments: Installments, LoanAmount: LoanAmount, OutStandingInstallments: OutStandingInstallments, LoanFormula: LoanFormula, LoanInterestRate: LoanInterestRate, DeductionStartPeriod: DeductionStartPeriod, DeductionStartYear: DeductionStartYear },
                            dataType: "json",
                            url: '@Url.Action("InstallmentDisplay", "SmartWebPortal")',
                         }
                    },
                schema: {                    
                        model: {
                            fields: {
                                InstallmentNo: { type: "string" },
                                InstallmentPeriod: { type: "string" },
                                InstallmentMonth: { type: "string" },
                                Principal: { type: "string" },
                                PrincipalRepaid: { type: "string" },
                                PrincipalBalance: { type: "string" },
                                Interest: { type: "string" },
                                InterestRepaid: { type: "string" },
                                InterestBalance: { type: "string" }
                            }
                        }
                },
                pageSize: 20
            },
            //toolbar: ["search"],
            height: 155,
            scrollable: true,
            sortable: false,
            filterable: false,
            pageable: false,
            selectable: "multiple, row",
            persistSelection: true,
            columns: [
                { field: "InstallmentNo", title: "Install", width: "50px" },
                { field: "InstallmentPeriod", title: "Period" },
                { field: "InstallmentMonth", title: "Month" },
                { field: "Principal", title: "Principal" },
                { field: "PrincipalRepaid", title: "Principal Repaid" },
                { field: "PrincipalBalance", title: "Principal Balance" },
                { field: "Interest", title: "Interest" },
                { field: "InterestRepaid", title: "Interest Repaid" },
                { field: "InterestBalance", title: "Interest Balance" }
            ]
        });
    };
</script>

 

Controller:

Public Function InstallmentDisplay() As ActionResult

    
        Return Json(installmentsJson, JsonRequestBehavior.AllowGet)
End Function

 

the function returns the following string:

 

"{""Installments"":{""Installment"":[{""InstallmentNo"":{""#cdata-section"":""1""},""InstallmentPeriod"":{""#cdata-section"":""11/2020""},""InstallmentMonth"":{""#cdata-section"":""May 2020""},""Principal"":{""#cdata-section"":""25,000.00""},""Interest"":{""#cdata-section"":""250.00""},""PrincipalRepaid"":{""#cdata-section"":""0.00""},""InterestRepaid"":{""#cdata-section"":""0.00""},""Period"":{""#cdata-section"":""0""},""Year"":{""#cdata-section"":""0""},""PrincipalBalance"":{""#cdata-section"":""25,000.00""},""InterestBalance"":{""#cdata-section"":""250.00""}},{""InstallmentNo"":{""#cdata-section"":""2""},""InstallmentPeriod"":{""#cdata-section"":""12/2020""},""InstallmentMonth"":{""#cdata-section"":""June 2020""},""Principal"":{""#cdata-section"":""25,000.00""},""Interest"":{""#cdata-section"":""125.00""},""PrincipalRepaid"":{""#cdata-section"":""0.00""},""InterestRepaid"":{""#cdata-section"":""0.00""},""Period"":{""#cdata-section"":""0""},""Year"":{""#cdata-section"":""0""},""PrincipalBalance"":{""#cdata-section"":""25,000.00""},""InterestBalance"":{""#cdata-section"":""125.00""}}],""Rows"":{""Returned"":""2""}}}"

 

But am not able to assign the jquery object to the kendo grid...

Nikolay
Telerik team
 answered on 21 Oct 2020
1 answer
149 views

Could anyone help me to provide some reference and examples for binding json data from PHP file (reading data from table) to kendo DDL (using jQuery) ?

Thanks.

Martin
Telerik team
 answered on 21 Oct 2020
7 answers
388 views

Hi,

Column resizing stop work if move horizontal scroll.

You can reapet there: https://demos.telerik.com/aspnet-mvc/grid/column-resizing

Resize some columns to increase width. Move horizontal scroll and then you can't resize

Tsvetomir
Telerik team
 answered on 20 Oct 2020
9 answers
937 views

Hi,

We are using Date axis line chart.We need to display a year data in the x-axis(dates), when we set baseUnit= "days", the labels are getting overlapped. So we have tried changing it to Fit, the kendo script automatically calculates average, there is no overlap in this case,but the points that are getting displayed is not matching the exact data. 

    Pls refer the attached snapshot, my data does not have any value for date 9/20/2015. Can it be made to show the points only for which the data is  available. Or please suggest how can we handle the cases when the data is more than 100.

Tsvetomir
Telerik team
 answered on 20 Oct 2020
5 answers
134 views

I am using the listview with a pager. When I refresh the listview with new data I want the page to go back to page 1 so I used the page() method. It doesn't work and the debugger shows the error message "pager.page is not a function". 

Here is the code initializing the pager:

var pager;  // this is global
pager = $("#pager").kendoPager({
  dataSource: dataSource
 });

 

And here's where I call the method:

  pager.page(1);

 

I have no idea why this function isn't recognized and would appreciate some help.

George Gindev
Telerik team
 answered on 20 Oct 2020
5 answers
579 views

I've reported this before on the forum and through support tickets.

If you have a grid column with the name "Fields[3].Value" Kendo throws an exception unnecessarily when trying to filter on it.

This can be fixed by adding a period to the list of accepted characters in the FilterLexer. I've done this myself a few times and I'm a bit tired of having to rebuild it every time Kendo gets updated...

 

Expected token
at Kendo.Mvc.Infrastructure.Implementation.FilterLexer.Tokenize()
   at Kendo.Mvc.Infrastructure.Implementation.FilterParser..ctor(String input)
   at Kendo.Mvc.Infrastructure.FilterDescriptorFactory.Create(String input)
   at Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass21.&lt;BeginInvokeAction&gt;b__19(AsyncCallback asyncCallback, Object asyncState)

Nikolay
Telerik team
 answered on 20 Oct 2020
1 answer
772 views
Does TreeList supports server side paging? If not, how to load large data, in ten thousands?
Nikolay
Telerik team
 answered on 20 Oct 2020
3 answers
2.5K+ views

Hello Everyone,

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. 

 

 

 

 

Petar
Telerik team
 answered on 20 Oct 2020
5 answers
410 views
I am facing scroll issue in android 9 devices. I have updated the kendo.ui.core.min.js library to latest version, but still having same problem. In my app there are div show/hide options. When i make a hidden div visible, the scrolling becomes very slow. I also enabled/disabled native-scrolling but no luck. I am really stucked here. Does anyone have solution for this?
Veselin Tsvetanov
Telerik team
 answered on 20 Oct 2020
2 answers
3.1K+ views
I have a grid containing sports teams and their associated stats, grouped by the team name. I want to sort the groups themselves (not the stats inside of the groups) by newest to oldest stats. Each stat has a timestamp for when it was added to the system.

Basically I need to list the stats of the teams who have most recently played a game at the top of the list.

Anyone know who to accomplish this?
Marouane
Top achievements
Rank 1
 answered on 20 Oct 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?