Telerik Forums
Kendo UI for jQuery Forum
1 answer
308 views

Is it possible to have multiple validator initializations on different div tags?  Basically I'm wanting to do a wizard (without the use of the progress bar) and I want to validate one div tag per "next" button.

    function ShowSection2()
    {
        //validation
        var validator = $("#Section1").kendoValidator().data("kendoValidator");
        if (!validator.validate())
        {
            return;
        ...

 

    function ShowSection3()
    {
        //validation
        var validator = $("#Section2").kendoValidator().data("kendoValidator");
        if (!validator.validate())
        {
            return;
        ...

Ivan Danchev
Telerik team
 answered on 07 Jan 2019
1 answer
95 views

Using R3 2018 SP1.

I need to bind to the select event using MVVM in order to prevent some nodes from being selected. I've modified the MVVM demo code to bind to the select event and I'm unable to get it working. Is this a known issue? Is there a workaround that I can use which uses MVVM?

 

Thanks

Marin Bratanov
Telerik team
 answered on 04 Jan 2019
3 answers
2.2K+ views

Hello,

I am trying to do the following: I copy some data from one TreeView to another They share a DataSource and essentially all I do is set value A to value B, while TreeView1 displays A and TreeView2 displays B.

My steps are:

1) I expand all nodes (loadOnDemand is true so the initial page load doesn't take too long).

2) After the expand is done I copy said data and

3) update the treeView by using node.load() 

(as recommended in this older thread: https://www.telerik.com/forums/force-reload-of-child-nodes#QqLTmHiNQkGQTnhxA2hLSA)

Now, this is working as expected, but as soon as the DataSource gets a bit bigger it gets really slow. My test Data has about 200 items in 3 layers and in IE it takes about 50s for the "node.load()" alone to finish. (Chrome is a lot better with about 5s, but unfortunately I have to use IE.)

I tried a lot of other ways to refresh or reload the TreeViews, but sadly nothing worked for me. I can't read the DataSource again, since my edits are only client-side at this point. A setDataSource() made no changes, as well as simply setting the DataSource (not that the last one is unexpected, but I was getting desperate...)

Does anyone here have a solution for me? Maybe I'm missing something really obvious?

 

Thanks!

Sara

Sara
Top achievements
Rank 1
 answered on 04 Jan 2019
3 answers
1.9K+ views
I have used Kendo grid and have a checkbox placed on top of grid, now grid is suppose to change data on basis of checkbox click, without making grid refresh.

Additionally tried bellow code in onCheck(e) function, but not getting updated model values -

var grid = $("#grid").data("kendoGrid");
var gridData = grid.dataSource.view();


///////////////////////////// Code CheckBox Implementation /////////////////////////////////////////////////////////////////////////
 @(Html.Kendo().CheckBox()
      .Name("Check")
      .HtmlAttributes(new { onchange = "onCheck();" })
      .Label("Check")

    function onCheck(e) {
      var grid = $("#grid").data("kendoGrid");
       var gridData = grid.dataSource.view();
     // gridData - not getting updated model data.
     // Here e is coming as "undefined"
    // I need something => e.model  //e.model.USER_ID
    }
Hence, here in onCheck(e) function, i need to pass "e" , so that i can do something like "e.model" so that i can get my values for e.g. "e.model.USER_ID"
Thanks
Viktor Tachev
Telerik team
 answered on 04 Jan 2019
2 answers
143 views

Hello. I'm been dealing with a problem when using conditional formatting. I've created a dojo to explain my problem.

https://dojo.telerik.com/UNoCUfiL/2

 

TL;DR of my problem: I have to use this format: "[<-10][RED]##,##0.00\%;[>10][RED]##,##0.00\%;##,##0.00\%". Everytime my cell value is < 10 ([<-10][RED]) or > 10 ([>10][RED]), it loses the negative sign. I can't write any rule based on the value 10, because it will change programmatically.. I'm just giving an example with the value 10.

 

 

Thank you!

Sandra
Top achievements
Rank 1
 answered on 02 Jan 2019
4 answers
728 views
This is visible on

https://demos.telerik.com/kendo-ui/grid/selection

Once the grid has loaded, hold "shift" and click any row below the first and all the rows between the first and the clicked row (inclusive) will be highlighted. Once any other row has been clicked this issue no longer occurs.
Eyup
Telerik team
 answered on 02 Jan 2019
1 answer
1.2K+ views

Have a Grid.cshtml page which has one dropdown which is defined by a EditorTemplateName named ValueViewTemplate.cshtml (below).... Would like to add more dropdowns to the Grid.cshmtl.  Currently seems like have to add more EditorTemplateName templates for each dropdown.  Is there way to pass in the ViewData to the EditorTemplateName function so don't have to define a editor template for each dropdown?

Also current pages seems to work for InCell and InLine... Is there way to make it work for Popup for does there need to be additional templates defined for the Popup option for editable mode...

 

Grid.cshtml

@(Html.Kendo().Grid<NEP_Deconstruction.Data.Models.ApprovalViewModel>()
                .Name("approval_grid")
                .Columns(columns =>
                {
                    columns.Bound(o => o.ApprovalNumber);
                    columns.Bound(o => o.ApprovalName);
                    columns.Bound(o => o.Comment);
                    columns.ForeignKey(o => o.ApprovalCountryID, (System.Collections.IEnumerable)ViewData["ApprovalCountry"], "ID", "Value")
                    .EditorTemplateName("ValueViewTemplate");
                    columns.Bound(o => o.EffectiveDate);
                    columns.Command(command => { command.Edit(); command.Destroy(); }).Width(210);
                })

                .ToolBar(toolbar => toolbar.Create())
                .Editable(editable => editable.Mode(GridEditMode.InLine))

 

 

 

 

ValueViewTemplate.cshtml

@model NEP_Deconstruction.Data.Models.ValueViewModel

@(Html.Kendo().DropDownListFor(m => m)
                .DataValueField("ID")
                .DataTextField("Value")
                .BindTo((System.Collections.IEnumerable)ViewData["ApprovalCountry"])
)

 

Viktor Tachev
Telerik team
 answered on 02 Jan 2019
6 answers
1.6K+ views

Is there a way to cancel the changes of one field in one item in the DataSource?

Let us say that the user is modifying in the grid one item and he wants to cancel the changes of this item (one specific field) and not all his changes in the grid, can this be done?

Austen
Top achievements
Rank 1
 answered on 31 Dec 2018
1 answer
6.2K+ views
Hello,

I do not want to show decimals. But by default my numerictextbox always shows decimals, when not active! How can i remove those decimals? I just want to see my value without any decimals.

Kind regards,
Jacob
Viktor Tachev
Telerik team
 answered on 31 Dec 2018
3 answers
1.0K+ views

Hi.

I have a few search fileds (text, kendoDropDownList, kendoMultiSelect) just above my grid.

Each change of such a search field changes the dataSource.filter of the grid in my "change" function.

I have a problem with the combination of the filters.

 

For example:

choosing "a" as a "status" in the kendoDropDownList will bring all the records with status "a".

If after selecting "a" as a "status" I select "b" as a "type" in another kendoDropDownList I want to get

all the records with "status" "a" and "type" "b".

If after that I change the selection of "a" to "c" I want to get all the records with "status" "c" and "type" "b" 

(removing the filter of "status" "a" and adding the filter of "status" "c" and "type" "b")

 

If I create a new filter in the "change" function and do:

dataSource.filter(newFilter)

I lose the filters I had before.

 

If I do:

var base = dataSource.filter();

newFilter = {logic: "or", filters: [...]};

base.filters.push(newFilter);

dataSource.filter(base);

I could get something like "status = 'a' and status = 'b'", and that's not what I want..

 

I would be happy to get help with that.

 

Thanks,

Eli.

Viktor Tachev
Telerik team
 answered on 31 Dec 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?