Telerik Forums
Kendo UI for jQuery Forum
1 answer
81 views
I'm creating an App with a filesystem. The filesystem contains folders wichs may contain folder or files. Before requesting the transport.read() we don't know if a folder contains subitems. We assume that a folder will contain subitems, so we set "hasChildren" property to true.

How we set "hasChildren" to false once the request returns no subitems, to make the expanding tree dissappear ?

fileSystem: {
                        items: new kendo.data.HierarchicalDataSource({
                            transport: {
                                read: function(options) {
                                    var url = (options.data && options.data.src) ? options.data.src : null;
                                    
                                    var request = PncServices.getFilesytem(url, {});
                                    
                                    request.done(function(data, textStatus, jqXHR) {
                                        var items = [];
                                        $.each(data, function(key, value) {
                                            
                                            var uri = URI(value);
                                            var parts = uri.toString().split("/");
                                            var index = (parts[parts.length-1] === "") ? parts.length-2 : parts.length-1;
                                            var isFolder = (index === parts.length-1);
                                            var label = parts[index];
                                            
                                            var item = {
                                                src: value,
                                                label: label,
                                                hasChildren: !isFolder
                                            };
                                            
                                            if(items.length <= 0) {
                                                //TODO: Set hasChildren to false
                                                //fileSystem.items.get(url).set("hasChildren", false);

                                            }
                                            
                                            items.push(item);
                                        });
                                        
                                        options.success(items);
                                    });
                                    
                                    request.fail(function(jqXHR, textStatus, errorThrown) {
                                        options.error(errorThrown);
                                    });
                                },
                            },
                            
                            schema: {
                                model: {
                                    id: "src",
                                    hasChildren: "hasChildren"
                                }
                            }
                        })   
Daniel
Telerik team
 answered on 06 Jun 2013
1 answer
110 views
I am testing out KendoUI and have a basic mobile nav setup. I have a layout for my main views and for sub views, I change to a different layout to show a back button. On my main views, I have a button aligned left that opens up a menu. My problem is when navigating into a sub view and clicking the back button, it will go back to the previous view but will also trigger the underlying button to fire as well. I have noticed this DOES NOT happen if I tap on the back button very fast and ensure my finger leaves the screen quickly. If I use a slow tap motion on the screen it will trigger the underlying button on the previous view to display the menu. I have tried several different things: Binding to the button that shows the menu with a click function and other similar approaches. The main issue I feel is that the KendoUI framework loads the new view/layout and does not reset the fact that your finger may still be on the same area where anew button will be and it may be firing even tho the only event that has taken place was a tap release/end instead of a full start/end tap. Anyway around this and do you think setting the touch event variables with a lower default interval for clicks would help?
Alexander Valchev
Telerik team
 answered on 06 Jun 2013
1 answer
151 views
I am creating a listview that when clicked opens up a modal. However I have a body of text in each item. I want to have inline links/navigation that is clickable and takes you to a new view.  However if the item is clicked on any other space that isn't an inline link I want to do the regular modal box.

I know kendo works best with kendomobilebuttons for user interaction, but what can you advise on this type of user interaction.

Petyo
Telerik team
 answered on 06 Jun 2013
3 answers
37 views
I am using forced iOS in my application and it looked fine in Android until I updated to the newest version which supports the badges. The icons on an Android device will show but now they have a blue box overlayed with them.

Is there a workaround for this?  Attached is a sample of the issue.

Robert
Kamen Bundev
Telerik team
 answered on 06 Jun 2013
5 answers
72 views
I am trying to have a total cell at the end of each row as described in post http://www.kendoui.com/forums/permalink/ZYoSEK-x_keMMJfogOHsSw

The suggestion listed works great.  However, as the post mentions, the totals don't get updated in real time (you need to sort or filter or do something else in order for the total field to get updated).  Is there a work around for this?  Thanks....
Dimiter Madjarov
Telerik team
 answered on 06 Jun 2013
1 answer
253 views
Do you know if it's possible to make some items of a dropdown list ( foreign key column) disabled and the rest enabled - based on a datasource property ?
Petur Subev
Telerik team
 answered on 06 Jun 2013
2 answers
811 views
Hi Team,

When i am deleting the last row of a grid i need to fire some even. Can you please suggest how can i fire an event in the grid when the rows is getting deleted. Below are my code

{ command: { name: "destroy", text: "" }, title: "&nbsp", width: "110px" }],

I have some functions like

edit: function() {},
save: function (data) {},
dataBound: function() {}

Please suggest

Thanks

Guillermo
Top achievements
Rank 1
 answered on 05 Jun 2013
1 answer
238 views
Hi,
I have checked the demo of kendo redial gauge and found all the demo code for kendo redial gauage size are fixed number,  without any percentage.  I have changed the css file to percentage, but the background image and gauge never be able to fit together. Will anybody provide some sample code? Many thanks. George

  #gauge-container {
            border-style:solid;
            border-color:red; 
            background:  transparent url(@Url.Content("~/Content/images/gauge-container-partial.png"))  ;
            background-vertical-position: -500% ;
            background-size: 100% 100%;
            width: auto;
            height: 100%;
            text-align: center;
            margin: -10% auto auto auto;
        }

        #SMDRReceiverMonitorChart {
            border-style:solid;
            border-color:blue; 
            width: auto;
            height: auto;
            align: center;
            margin: auto auto auto auto;
            
            border-color: transparent;
        }

        #gauge-container .k-slider {
           margin-top: -11px;
            width: 140px;
            
        } 
  
Iliana Dyankova
Telerik team
 answered on 05 Jun 2013
1 answer
115 views
Hi,

I defined a ViewModel with an ObservableArray as "items". Then I bound "items" to the grid with data-bind="source: items".
The grid is data-editable="inline" and there are edit and destroy commands defined.

Data from ObservableArray displays ok in the grid.
Delete button works ok.
But when I edit a row, after any action ("update" or "cancel") the grid became empty and no data is shown anymore.

This is the grid configuration:

<div id="gridMediciones" data-role="grid"
    data-bind="source: items"
    data-sorteable="true"
    data-scrollable="true"
    data-groupable="true"
    data-editable="true"
    data-columns="[
        'Nombre',
        'VolumenEstandar',
        'Volumen',
        {command: ['destroy'], title:' '}
        ]"
    ></div>
and this is the viewmodel configuration:

var viewActions = function ($grid) {
 
    var data = {
        items: [
            { Id: 1, Nombre: "Medidor 1", VolumenEstandar: 100, Volumen: 200 },
            { Id: 2, Nombre: "Medidor 2", VolumenEstandar: 200, Volumen: 300 },
            { Id: 3, Nombre: "Medidor 3", VolumenEstandar: 300, Volumen: 400 },
        ]
    },
    viewModel = kendo.observable(data);
     
    return {
        viewModel: viewModel
    };
 
}($("#gridMediciones"));
 
//inicialización de la vista
$(function () {
    kendo.bind($("body"),viewActions.viewModel);
});

Is it anything wrong?

Thanks in advance
guga
Top achievements
Rank 1
 answered on 05 Jun 2013
2 answers
183 views
Hi!

I was looking at the Window component documentation. There is a request option called "template". I am assuming this template can be used to format JSON data returned from the server. So, the template I used was the following:
"#= html #"
The data returned from the server is something like:
"html": "<span>Hello world!</span>",
"instanceId": "10A",
"data": null
However, I always get a Javascript error that says "ReferenceError: html is not defined".

Any ideas why html is not defined though it comes in the response body?

Regards.
Luis
Top achievements
Rank 1
 answered on 05 Jun 2013
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?