Telerik Forums
Kendo UI for jQuery Forum
0 answers
211 views
Dear KendoUI Community,

I'am working on a WebApplication, based upon Backbone.js, Rails3 as JSON API and want now include KendoUI.

If I visit the Show-View for a selected Object (www.dogspots.de/#spots/1), my browser performs 2 JSON-Requests to the Server and I have an JS-Error: http://i48.tinypic.com/akbacn.png (Uncaught TypeError: Cannot call method 'getAttribute' of undefined)
When I disable KendoUI again, everything is fine: http://i45.tinypic.com/30t74o0.png (no JS error and 1 JSON-Request)

I believe that Backbone an KendoUI performs both an request to the server, unfortunately is KendoUI not able to parse my JSON response, which results into a JS-Error and a blank Layout

My Solution would be to disable de router-module of KendoUI and keep the work on Backbone.js. Do you agree with me?
I also tried to include your kendo.backbone.js example on github, but it doesn't changed anything.

You can also see a preview with this error on www.dogspots.de

Best regards
Gerrit
Gerrit
Top achievements
Rank 1
 asked on 05 Aug 2012
0 answers
214 views
Is the kendo upload control capable of invoking an ASP.NET webforms page method?  For instance:

        [WebMethod]
        public static string FileUpload(string id) { ... }

I see the control posting-back asynchronously, but this method is never invoked.  Here is the control creation logic:

var crudServiceBaseUrl = "Default.aspx";
 
           $("#files").kendoUpload({
               async: {
                   saveUrl: crudServiceBaseUrl + "/FileUpload",
                   autoUpload: false
               },
               multiple: false,
               showFileList: true,
           });


Dan
Daniel
Top achievements
Rank 1
 asked on 05 Aug 2012
0 answers
143 views
Hello I am testing out several UI sets for JQuery. I am really impressed with Kendo. But I am having trouble with a custom editor. I was able to get a date picker working in the grid, just not a combo box. Here is my code. It shows the box, just doesn't return the selection. I based this off your example, but can't make it work. function statusDropDownEditor(container, options) {        $('<input data-text-field="StatusName" data-value-field="StatusName" data-bind="value:' + options.field + '"/>')             .appendTo(container)             .kendoComboBox({                   dataTextField: "text",                     dataValueField: "value",                     dataSource: [                         { "text":"Open", "value":"opn" },                         { "text":"Approved", "value":"app" },                         { "text":"Declared", "value": "dec" },                         { "text":"Dispursed", "value": "dis" }                     ]});     }   This shows the drop down, however it doesn’t put the newly selected item in the field.   I am unsure as to why it wouldn’t.  Also - can I have columns protected based on the row they are on, for example on row one they are editable, but not row two? Thanks.
Dark
Top achievements
Rank 1
 asked on 03 Aug 2012
1 answer
420 views
In the below piece of code the binding seems to be one way - Model to View. However when the element value is modified the corresponding Model value is not updated. 

The Input fields load the data from the array correctly but after the data has been modified in the input fields the variables "viewModel"  and "data" are not updated. (Modify the name of Perry Sofa and click the "click" button below.)

Is there anyway I can achieve two way binding - (Model to View and View to Model)? Apologies in advance for using relative paths of the kendo and jquery js files.

<!DOCTYPE html>
<html>
<head>
    <title>Source and template binding</title>
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
     <link href="../../../styles/kendo.common.min.css" rel="stylesheet" />
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet" />
    <script>
    var data;
    var viewModel;
    function showVM()
    {
    alert(viewModel.get('products[1].name'));
    }
    </script>
    <script id="template" type="text/x-kendo-template">
    <div>
    <input type="text" data-bind="text: name" value="${name}"></input><br>
    <input data-bind="text: unitsInStock" value="${unitsInStock}"></input><br>
    <button class="k-button" data-bind="click: deleteProduct">Delete</button><br>
</div>    
    </script>
</head>
<body>
    <div id="example" class="k-content">
    <div data-template="template" data-bind="source: products"></div>
<script>
    $(document).ready(function() {
    data = [
                { name: "Hampton Sofa", price: 989.99, unitsInStock: 39 },
                { name: "Perry Sofa", price: 559.99, unitsInStock: 17 },
                { name: "Donovan Sofa", price: 719.99, unitsInStock: 29 },
                { name: "Markus Sofa", price: 839.99, unitsInStock: 3 }
            ];
        viewModel = kendo.observable({
            products: data
        });
        kendo.bind($("#example"), viewModel);
    });
    </script>   
<input type="button" onclick="showVM()" value="click"/>
</div>
</body>
</html>
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 03 Aug 2012
1 answer
193 views
I want to display data on particular dates, i have two array which contains some dates, if my current date matches with tht array date then i want to shoe some value from tht array.
I tried to use each loop on that array on content of calendar but its giving runtime error called Invalid Template.....Any Suggestions????

I have two array which are Two dimensional,

 

populateCalendar:

 

function (Holiday) { 

var  holidaydateList = []

//constructing holidaydatelist array from Holiday object...
$.each(Holiday, function (index, model) { 
var day = model.HolidayDate.toString();  
holidaydateList.push({ HolidayDate: day.substring(6, day.length - 2), HolidayData: model.HolidayName });
});

$("#forecastCalendar").kendoCalendar({  
//value: today, 
month: {
// template for dates in month view 
content: 
'# jQuery.each([' + holidaydateList + '],function(index,item){ #'
'# if (item.HolidayDate == +data.date) { #'
'<div style="background-color: Aqua">item.HolidayData</div>'
'# } else { #'
'<div></div>'
'# } #'
'# }); #'
'#= data.value #' 
},
footer: 
"Today - #=kendo.toString(data, 'd') #" 

});

Kumarasen
Top achievements
Rank 1
 answered on 03 Aug 2012
1 answer
250 views
As is modeled in this jsfiddle, when one selects an item via the mouse, the event is raised.  My question is, why isn't the event raised when the user clicks on the button?

Is this a bug?  In the docs it clearly states that the select event is "triggered when an item of a PanelBar is selected."
Frank
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
228 views
I am creating a grid, and the object each row is bound to contains a complex object that I want to be able to edit and update. The object has a property that is just a number, and I want to be able to see/edit/update that number in the grid. I can make the number visible easily enough using a template, but does the grid know how to allow edits/updates to the original data source?

As an example, the object the row is bound to may look like:

data = {
    ListPrice: {
        value: 8.99
    }
}

So, I want to show "8.99" in the grid, which I can do by defining my columns like so:

columns: [
    {
        field: 'ListPrice',
        title: 'List Price',
        template: '#= ListPrice.Value #'
    }
]

But, will I be able to edit this value in the grid? And how will the grid know to update the Value property when I do the edit?

Thanks
G_P
Top achievements
Rank 1
 answered on 03 Aug 2012
0 answers
345 views
I'm writing an app to allow users to create/modify XML strings.  I'd like to use the editor for that.

    var editor = $("#templateEditor").data("kendoEditor");
    editor.paste("paste in a string" + "<xmlNode>inner text</xmlNode>");

with the above I will get the "paste in a string" and "inner text" but not the node tags.  is there a way to allow this so the user can just modify everything as text string?
Eric
Top achievements
Rank 1
 asked on 03 Aug 2012
2 answers
203 views
I have a requirement where the application has to allow the users to not enter or select any date in the DatePicker control that is present in the grid. If no date is selected the value goes back to the database as null and also shows up as null in the grid.I do not want null to show up in the grid, is there a way to override the null value with something more meaningful like 'TBD' or just leave it empty and not display anything in that field.
Kavitha
Top achievements
Rank 1
 answered on 03 Aug 2012
6 answers
234 views
I think I just encountered a strange bug. I am running on both the Android 4.0.3 Emulator and an Android 4.0.3 Device (Samsung Galaxy S II).

If I initialize my application like so:
app = new kendo.mobile.Application($(document.body));
<input> html elements seem to not function. As in I can not edit text in text boxes and buttons don't fire any bound click events.

However, If I initialize the application in the following manner:
app = new kendo.mobile.Application($(document.body), {platform: "android"});
then I have no problems at all. Obviously, I would like to use the first initialization for cross-platform styling. 

This does not happen if I use the 2012.1.515 version of Kendo's styles, <inputs> will work either way with them.
I would also like to use the newer styles since I think they look better on the android platform.

I have already looked at this documentation: http://docs.kendoui.com/getting-started/mobile/forms
But using the css at the bottom has had no effect.
RodEsp
Top achievements
Rank 2
 answered on 03 Aug 2012
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
Drag and Drop
Application
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
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?