Telerik Forums
Kendo UI for jQuery Forum
3 answers
2.4K+ 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
2.0K+ 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
164 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
814 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.3K+ 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.7K+ 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.3K+ 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.1K+ 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
2 answers
619 views

Hi,

I'm using a kendoTooltip control with the content.url configuration.

The problem is it takes a second or so to load the content, which is a long time when you're hovering over something frequently.

I'd like to know if it's possible to programatically load the content in the background (say, a few seconds after the page loads). Then when the user hovers over the target control, the tooltip can display instantly (having already loaded the content).

Thanks,

George

Veselin Tsvetanov
Telerik team
 answered on 31 Dec 2018
2 answers
372 views

Hello everyone,

I have a dynamic Kendo grid that can perform CRUD operations. Foreign Keys are retrieved and mapped to their value and placed in the grid as a drop down list using an editor template, similar to this example here: https://demos.telerik.com/kendo-ui/grid/foreignkeycolumn

I have virtualization enabled on those FK dropdowns similar to this example: https://demos.telerik.com/kendo-ui/dropdownlist/virtualization and my dropdown correctly calls the valueMapper with the id. The problem is with the valueMapper, as this function only receives the FK id or dataitem. I am not able to communicate to the server which column the FK id belongs to, and thus can not return the index of the value. This problem seems that it could result in any grid that has multiple foreign keys so I am hoping there is a solution but I have been unable to find one. Any tips/leads would be greatly appreciated!

Here is my DynamicForeignKey editor template that is used as in each FK column of the grid.

@(
     Html.Kendo().DropDownListFor(m => m)
            .Filter(FilterType.Contains)
            .HtmlAttributes(new { style = "width:300px" })
            .Height(290)
            .DataValueField("ForeignKeyID")
            .DataTextField("ForeignKeyName")
            .DataSource(source =>
            {
                source.Custom()
                    .ServerFiltering(true)
                    .ServerPaging(true)
                    .PageSize(80)
                    .Type("aspnetmvc-ajax")
                    .Transport(transport =>
                    {
                        transport.Read("Read", "ForeignKey", new { SchemaName = ViewData["SchemaName"], TableName = ViewData["TableName"], ColumnName = ViewData["ColumnName"] });
                    });
            })
            .Virtual(v => v.ItemHeight(26).ValueMapper("valueMapper"))
)
Austen
Top achievements
Rank 1
 answered on 28 Dec 2018
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?