Telerik Forums
Kendo UI for jQuery Forum
4 answers
192 views
Hi

I have a tree list with a custom edit popup setup containing a multiselct box and having a couple of issues getting the data-bind working correctly.

Here is a subset of the ds_Tables - all fine

    var ds_Tables = new kendo.data.DataSource({
        data: [
            {id:'MemberAdvertising', name:'Advertising'},
            {id:'MemberCorporate', name:'Corporate'},
            {id:'MemberHotel', name:'Hotel'},
            {id:'MemberSpecialOffer', name:'Special Offers'}
        ]
    })

Here is the code for the multiselect which loads and works fine

                        <select id="MemberType_MemberTypeTables" name="MemberType_MemberTypeTables"
                            data-bind="value:MemberTypeArray, source:ds_Tables"
                            data-value-field="id"
                            data-text-field="name"
                            data-source="ds_Tables"
                            data-role="multiselect" /></select>

The MemberType_MemberTypeTables  variable in JSON is a comma separated string, so my Treeview edit looks like

       edit: function(e) {
            var MemberTypeArray = e.model.MemberType_MemberTypeTables.split(",");
            e.model.MemberTypeArray = MemberTypeArray;
       }

where I'm basically creating an array of tables to use as the data-bind values and assigning to a 'dummy variable' e.model.MemberTypeArray

The first time I press edit it doesn't do the data-binding showing the selected tables, but if I then press cancel and then edit again it works ok.

How can I force the edit popup to use the Array the first time ?

Thanks in advance.

Dave
Martin
Telerik team
 answered on 16 Apr 2020
3 answers
822 views

Hi,

Does anyone know if it's possible to chain promises on the click of the 'ok' button in kendo.alert(), like you can do with kendo.confirm()?

If not, is there any other way I can latch on the 'click ok' event for a kendo alert?

Thanks.

Dimitar
Telerik team
 answered on 16 Apr 2020
1 answer
396 views
I cannot use most of my combobox's on my page due to the fact that when I try to select a value by clicking the combobox, it triggers page scroll to top of my page. These combobox's are quite low on my page and therefor I cannot access the values due to this auto scrolling. Please help.
Ivan Danchev
Telerik team
 answered on 15 Apr 2020
1 answer
128 views
I have multiple combobox's. One for each detailRow headerTemplate. When I expand new detail Row tabs the combobox clear button "X" keeps appending more "X" s and Im not sure why this is happening or if there is a work around?
Ivan Danchev
Telerik team
 answered on 15 Apr 2020
9 answers
1.0K+ views

Hi,

There is something similar like undo button or revert button which can restore the last value from an input field, something similar like undo from kendo editor? 

I'v seen an example here:https://docs.telerik.com/kendo-ui/controls/diagrams-and-maps/diagram/how-to/modify-undo-redo-stack.

Best regards,

Alex

Petar
Telerik team
 answered on 15 Apr 2020
1 answer
135 views
Hi I am wondering if it is possible to do filtering of detail rows using for example 2 combobox or dropdownlist values. Like if I select 1 dropdown value "Fred" I get all entries within that detail row matching "Fred" name field and then if I select "Blue" from second dropdown I get all matches of Name: "Fred" with Color: "Blue" .
Viktor Tachev
Telerik team
 answered on 15 Apr 2020
4 answers
1.0K+ views
I'm using version 2014.2.903 and I'm trying to format the numbers in the pager associated with my grid. The pager is showing 1-10 of 100000 and I would like to format the numbers so they have commas when appropriate. I tried accessing the pager information on the dataBound event, but unfortunately the pager hasn't been configured by the data from the datasource at that point so my changes get overwritten when the pager loads from the datasource.

I also tried doing something funky with the pageable: { messages: { of: "" } } configuration, but it's being ignored.

Here's my grid definition:

var grid = $("#grid").kendoGrid({
    name: "results",
    columns: columns,
    dataSource: new kendo.data.DataSource({
        type: "aspnetmvc-ajax",
        transport: {
            read: {
                url: "/Content/GetContent",
                type: "POST",
                dataType: "json",
                },
                error: function(xhr, error) {
                    alert("There was an error transporting the data from the server, likely because you've requested too much information. Try filtering the results further or selecting a smaller page size.");
                },
            },
        },
        pageSize: 10,
        serverPaging: true,
        serverSorting: true,
        schema: {
            total: "total",
            data: "data",
            model: {
                fields: {
                    Title: { type: 'string' },
                    Contributors: { type: 'string' },
                    ContentType: { type: 'string' },
                    IsForthcoming: { type: 'int' },
                    IsLive: { type: 'int' },
                    AlsoAvailableOn: { type: 'string' },
                    HasSecureCenterSetup: { type: 'int' },
                    SocrLink: { type: 'string' },
                    IsMarcRecord: { type: 'int' },
                    HasAssignment: { type: 'int' },
                    Size: { type: 'number' },
                    LastLoadedBy: { type: 'string' },
                    LastLoadedOn: { type: 'date', format: "{0:MM/dd/yyyy}" },
                    SeverityLevel: { type: 'number' },
                }
            }
        },
    }),
    pageable: { pageSizes: [10, 25, 50, 100] },
    sortable: true,
    scrollable: true,
    resizable: true,
    reorderable: true,
    dataBound: function(e) {
        if ($(".k-pager-sizes .l-viewall").length == 0) {
            $(".k-pager-sizes").append(' <input type="button" class="k-button k-button-icontext l-viewall" value="View All" />');
        }
        $(".l-viewall").click(function() {
            var dataSource = e.sender.dataSource,
                total = dataSource.total();
 
            dataSource.pageSize(total);
        });
    },
});

Any help would be greatly appreciated.

Rachael
Rumen
Telerik team
 answered on 15 Apr 2020
2 answers
110 views

As I know some events(like actionClick and collapse) and some Configuration(like collapse, alterningMode) are not working if I use custom template.

Is it a bug or not? 

Thanks,

Nurbek A.

Nurbek
Top achievements
Rank 1
 answered on 15 Apr 2020
1 answer
226 views
I have a grid, which has few columns. While filtering, columns other than date column are picking distinct values as part of the filter. But, when it is date, it is not picking the distinct values. So, is there any way using which the unique dates can be picked and displayed in the filter?
Viktor Tachev
Telerik team
 answered on 14 Apr 2020
3 answers
2.6K+ views

Hi,

We are seeing an issue with new Kendo upgrade (2020). There are 2 scenarios that we have found that Kendo grid pagination is not working.

Scenario 1 : 

Kendo pagination doesn't work on the pageload, but it starts working when I click F12 to inspect the elements. It was working fine with the old version (2017). Below is the source code for the Grid.

  @(Html.Kendo().Grid<vm>()
                                                            .Name("id")
                                                            .Columns(columns =>
                                                            {
                                                                columns.Bound(d => d.FirstName).Title("First Name").Width(150);
                                                                columns.Bound(d => d.LastName).Title("Last Name").Width(150);
                                                                columns.Bound(d => d.MemberAddress).Title("Address");
                                                                columns.Bound(d => d.MemberDOB_STR).Title("DOB").Format("{0:MM/dd/yyyy}").Width(100);
                                                                columns.Bound(d => d.MemberId).Title("Member ID").Width(140);
                                                                columns.Bound(d => d.ZipCode).Title("Zip Code").Width(120);                                                                
                                                            })
                                                            .ToolBar(tools => tools.Excel())
                                                          .Excel(excel => excel
                                                          .Filterable(true)
                                                            .Filterable(filterable => filterable.Extra(false).Operators(operators => operators.ForString(str => str.Clear().StartsWith("Starts with").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to"))))
                                                            .Scrollable(s => s.Height("200px"))
                                                            .Pageable()
                                                             .Resizable(resize => resize.Columns(true))                                                      
                                                            .Sortable()
                                                            .DataSource(dataSource => dataSource
                                                            .Ajax()
                                                             .Sort(s => s.Add("MemberId").Descending())
                                                            .PageSize(10)
                                                            .Read(read => read.Action("Some Action", "Controller").Data(""))
                                                        ).AutoBind(false)
            )

 

Scenario 2: 

 

In this case the pagination doesn't even work . The same was working fine with the old verison.

 

  @(Html.Kendo().Grid<DiagnosisICDVM>()
                            .Name("grdMemberDiagnosis")
                            .Events(e => e.DataBound("DisplayDataMessageMemberDiagnosis"))
                            .Columns(columns =>
                            {
                                columns.Bound(d => d.CDCode).Title("Code").Width(100);
                                columns.Bound(d => d.Description).Title("Diagnosis").Width(250);
                                columns.Bound(d => d.CodeVersion).Title("ICD Version").Width(120);
                                columns.Bound(d => d.ICDStartDate).Title("Start Date").EditorTemplateName("date").Format("{0:MM/dd/yyyy}").Width(120);
                                columns.Bound(d => d.ICDEndDate).Title("End Date").EditorTemplateName("date").Format("{0:MM/dd/yyyy}").Width(120);
                                columns.Bound(d => d.SourceType).Title("Source").Width(120).HtmlAttributes(new { title = "#=SourceType#" });
                            })
                            .ToolBar(tools => tools.Excel())
                                  .Excel(excel => excel
                                  .Filterable(true)
                        .Pageable(p => p.PageSizes(true).Refresh(true))
                        .Resizable(resize => resize.Columns(true))
                        .Sortable()
                        .Scrollable()
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Sort(s => s.Add("CDCode"))
                        .PageSize(100)
                          .Model(model => { model.Id(p => p.CDCode); })
                        .Events(events => events.Error("error_handler"))
                        .Read(read => read.Action("Some Action", controller).Data("JSFunction")))
        )

Bootstrap 3 and JQuery 1.12.4 being used as per the Kendo recommendation.

Please help in resolving this issue as we are close on the deadlines.

 

Thanks

 

Ivan Danchev
Telerik team
 answered on 14 Apr 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?