Telerik Forums
Kendo UI for jQuery Forum
1 answer
151 views
I am using the Kendo TreeView with pure JavaScript, no JSP or ASP.NET involved.

My TreeView is 4 levels deep. The actual formatting of the nodes is accomplished using the template language.

I have a need to (potentially) change the information displayed for each node as the selection is changed. I have created my own onSelect event handler to do this. Specifically, what I need is to change a node's descendant nodes recursively based upon the value of the node.Nodes that have never been expanded can be ignored since this is handled by a different mechanism, only the loaded nodes need to be modified.

I know that I can recursively modify the value of each descendant node's DataItem to contain the updated information but this modification is not reflected in the browser. I apparently need to have some way to trigger the page renderer to rerun the template code to redraw each node.

Is there any way I can accomplish this?
Alexander Popov
Telerik team
 answered on 28 Oct 2014
1 answer
228 views
I have a question about the Column.Filterable.UI property.  I have been experimenting with custom filtering by following this example http://dojo.telerik.com/EyoL/31, however it appears that the UI function only gets called once.  Is this correct?  What I am trying to do is limit the values displayed based on other filters applied.  Below is a sample of my function.
01.function createMultiSelect(element, fieldName) {
02.            var isFilter = $("#grid").data("kendoGrid").dataSource.filter();
03.            var data = $("#grid").data("kendoGrid").dataSource;
04.            var ds = data.data();
05.            if (isFilter) {
06.                var query = new kendo.data.Query(ds);
07.                ds = query.filter(isFilter).data;
08.            }
09.            else {
10.                ds = data.data();
11.            }
12.            //var names = ds.sortBy(ds.uniq(ds.pluck(ds, "GroupCode")), function (n) { return n; });
13.            var names = _.sortBy(_.uniq(_.pluck(ds, fieldName)), function (n) { return n; });
14.            //mvvm binding should be removed, other way the dataSource will try to update the UI when the dataSource filter has changed
15.            element.removeAttr("data-bind");
16. 
17.            element.kendoMultiSelect({
18.                dataSource: names,
19.                change: function (e) {
20.                    var curFilter
21.                    if (isFilter) {
22.                        curFilter = data.filter().filters;
23.                    }
24.                    else {
25.                        curFilter = [];
26.                    }
27.                    var filter = { logic: "or", filters: curFilter };
28.                    var values = this.value();
29.                    $.each(values, function (i, v) {
30.                        filter.filters.push({ field: fieldName, operator: "eq", value: v });
31.                    });
32.                    console.log(this.dataSource.data());
33.                    $("#grid").data("kendoGrid").dataSource.filter(filter);
34.                }
35.            });
36.        }

Alexander Popov
Telerik team
 answered on 28 Oct 2014
1 answer
282 views
Hi there,
I'm attempting to set a "No Data Message"  for various charts and I've been using the chart's databound event to check on the number of records returned and then add a "No Data" div to the chart object as per various online discussions. My Databound event is as follows:


<br>function ConsultantParetoBound(e)<br>        {   <br>  if (this.dataSource.data().length == 0)              {                    $('<div class="custom-overlay"><p class="errorMessage">No data available for the       selected range</p></div>').appendTo('#consultantPareto');                    alert();                             }        }




This *almost* works in that if I debug the code above, the message is shown, then the alert is shown....however, as soon as I click OK at the alert, the chart appears to be re-rendered, which then removes the newly added div, meaning I'm left with an empty chart with no message.



Is there a way around this?
T. Tsonev
Telerik team
 answered on 28 Oct 2014
1 answer
134 views
Hi, I have a data grid bound to an ObservableArray

The data in this grid may get refreshed every 10 seconds or so, but I would like to keep the current options of the grid intact (sorting , columns etc)  when presenting this new data

Any clues ? ;)

Kiril Nikolov
Telerik team
 answered on 28 Oct 2014
1 answer
592 views
Is there any way to select the inserted row after saving a popup edit?

This is my grid:
01.@(Html.Kendo().Grid<Receipt>()
02.    .Name("GridReceipts")
03.    .Columns(columns => {
04.        columns.Bound(o => o.ReceiptId);
05.        columns.Bound(o => o.Status);
06.        columns.Command(c => {
07.            c.Edit().Text(" ");
08.            c.Destroy().Text(" ");
09.        });
10.    })
11.    .DataSource(d => d
12.        .WebApi()
13.        .Model(m => {
14.            m.Id(o => o.ReceiptId);
15.        })
16.        .Create(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))
17.        .Read(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))
18.        .Update(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))
19.        .Destroy(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))
20.    )
21.    .Pageable(p => p
22.        .Refresh(true)
23.        .PageSizes(true)
24.        .ButtonCount(5)
25.    )
26.    .ToolBar(toolbar => toolbar.Create())
27.    .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("Receipt"))
28.    .Sortable(s => s.AllowUnsort(true))
29.    .Selectable()
30.    .Deferred()
31.)

I have tried the following, which selects the row but immediately deselects it (as if the grid refreshes?):
1.function saveReceipts(e) {
2.    var grid = $("#GridReceipts").data("kendoGrid");
3.    var dataItem = grid.dataSource.get(e.model.ReceiptId);
4.    var row = grid.tbody.find("tr[data-uid='" + dataItem.uid + "']");
5. 
6.    grid.select(row);
7.}
Daniel
Telerik team
 answered on 28 Oct 2014
5 answers
406 views
Hi,

We have an requirement that allow a user to enter multiple records at a same time. As I have seen the demo, I feel the batch editing is good option for us.

But we might have a issue that, we need to allow user to select a data from different controls such as Dropdown list, Datepicker and may be some other. In one of the demo sample, I have seen that Dropdown list is added to a column by specifying Foreign Key column mapping (If I am not wrong, that has been done by using Entity Framework).
 
We are using Model class as source to bind the Grid and we are not using Entity Framework here. By binding Model class is it possible that, we can add these different controls to the columns and is there any examples or sample code?

Regards!

Venkat
Top achievements
Rank 1
 answered on 28 Oct 2014
1 answer
140 views
for some unknown reason I can't upload MPG files in async mode (only interested in async).
the problem also repeat on the telerik kendo upload demo.

you can get sample files from:
http://hubblesource.stsci.edu/sources/video/clips/

Please advise,
mickey
Dimiter Madjarov
Telerik team
 answered on 27 Oct 2014
1 answer
82 views
Good day! 
I had a problem in a hybrid application for android. 
To display the content of the resource (Assets) used WebView when navigating

kendo.app.navigate('Content/index.html')

navigation succeeds. When you set the parameters

kendo.app.navigate('Content/index.html?type=0&param=10')

opening page does not occur. How to fix.
Used kendo version 2014.1.416

Debugging information at runtime:
10-24 10:36:57.673 D/dalvikvm(17324): GC_EXPLICIT freed 0K, 10% free 5320K/5859K, paused 1ms+2ms
10-24 10:36:58.424 D/dalvikvm(17324): GC_EXPLICIT freed 0K, 10% free 5320K/5859K, paused 1ms+2ms
10-24 10:36:59.735 D/dalvikvm(17324): GC_EXPLICIT freed 4K, 10% free 5322K/5859K, paused 2ms+4ms
10-24 10:37:00.085 D/memalloc(17324): /dev/pmem: Mapped buffer base:0x60a41000 size:33251328 offset:32727040 fd:127
10-24 10:37:00.145 D/memalloc(17324): /dev/pmem: Mapped buffer base:0x57540000 size:524288 offset:0 fd:133
10-24 10:37:00.616 D/dalvikvm(17324): GC_EXPLICIT freed 17K, 9% free 5375K/5859K, paused 2ms+2ms
10-24 10:37:01.276 D/memalloc(17324): /dev/pmem: Mapped buffer base:0x57b00000 size:1048576 offset:524288 fd:136
10-24 10:37:01.557 D/dalvikvm(17324): GC_EXPLICIT freed 2K, 9% free 5372K/5859K, paused 2ms+3ms
10-24 10:37:02.358 D/dalvikvm(17324): GC_EXPLICIT freed 0K, 9% free 5372K/5859K, paused 2ms+3ms
10-24 10:37:04.119 D/memalloc(17324): /dev/pmem: Unmapping buffer base:0x60a41000 size:33251328 offset:32727040
10-24 10:37:04.129 D/memalloc(17324): /dev/pmem: Unmapping buffer base:0x57540000 size:524288 offset:0
10-24 10:37:04.129 D/memalloc(17324): /dev/pmem: Unmapping buffer base:0x57b00000 size:1048576 offset:524288
10-24 10:37:04.319 D/chromium(17324): Unknown chromium error: -6
Petyo
Telerik team
 answered on 27 Oct 2014
1 answer
184 views
Hi 
By the same line in the grid tied a few pictures, I need to see the (possibly reduced image to the cell size), delete, and load a new image. Grid with inline editing. Anyone tell me how to do it, I would be very grateful for any help. 

Thanks for your help
Petur Subev
Telerik team
 answered on 27 Oct 2014
1 answer
101 views
I am using Visual Studio 2012 ASP MVC with Kendo UI. 2014.1.528 professional.

I have a master grid on which I display summary information for the data model that can be edited. The detail template is a tabstrip with  one or more tabs, each tab has a grid on it. These tab-grids display information from associated data records or additional information from the data model. On the associated records the grid has its own data source and transport and works fairly well. The grids that are extension of the data model display the data correctly and I can enter data into the field and that data is reflected in the data model. 

The issue I am having is that the master grid seems to be intercepting the both the 'Tab' and 'Enter' keystrokes on the way down the event tree to the detail grid cells. Normal character keys enter data into the cells. When editing in either Master Grid Row or the Tab Grid Detail row the 'Enter' key is intercepted and toggles the expansion/collapse of the detail row.

When editing data in the Tab Grid Detail Row when the grid is display a portion of the data model and use the 'TAB' key with the intent of moving to the next column, The Master Grid intercepts this and collapses the detail row, and selects the header to the first column of the Master Grid. The edit is not lost because I still see the change after I expand the row again. If I use the mouse to move between fields I can get all the fields to update.

I have looked at this by trapping the keystrokes by binding .on(keydown, keyup, keypress) to the detail grids and halting execution with the debugger statement.  How can I prevent the Master Grid from intercepting these keys so that they can be used in the detail? 
Kiril Nikolov
Telerik team
 answered on 27 Oct 2014
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
Drag and Drop
Map
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?