Telerik Forums
Kendo UI for jQuery Forum
1 answer
324 views
Where can I download the non-minified version of kendo web?
Thanks in advance :)
Ryan
Top achievements
Rank 1
 answered on 28 Aug 2012
1 answer
101 views
Hi,
I am told that the splitter is not working i.e. not resizable on an iPad. Can anyone confirm this and are there plans to fix it?

Regards
Nohinn
Top achievements
Rank 1
 answered on 28 Aug 2012
1 answer
105 views
How do I format a date that is coming in like this: 2012-08-23T14:53:08.02 ?
I've got the grid column defined with a template 

template: '#= kendo.toString(DateReceived, "MM/dd/yyyy") #'

But it's not working. Data is coming from a Web API method and in the model it's a DateTime property. 
Rayne
Top achievements
Rank 1
 answered on 28 Aug 2012
3 answers
469 views
I'm using kendo upload with Rails, and I had to hack the kendo.upload.js source code to get a feature that didn't seem to be apparent.

Basically, we need to submit a custom anti-CSRF token with every POST.

In kendo.upload, there is the method:

function getAntiForgeryTokens() {
    var tokens = { };
    $("input[name^='__RequestVerificationToken']").each(function() {
        tokens[this.name] = this.value;
    });
 
    return tokens;
}

However, in Rails, this token is called authenticity_token. It seems like we have to do something like this:

$(thing).kendoUpload({
  // ...
  upload: function(event) {
    event.data = {
      authenticity_token: $("input[name=authenticity_token]").val()
    };
  }
});

Can we get authenticity_token added by default in the future? :)
T. Tsonev
Telerik team
 answered on 28 Aug 2012
4 answers
314 views
Hello, I notice on the home page of the Kendo site it lists IE7+ as a supported browser.  My client has some IE 7 machines.  When I test my samples on either IE8 in compatibility mode, or IE7 native, they do not work.  I get the javascript error "JSON not defined".

Also, see the attached picture on how the Keno UI Demo site renders on my IE7 machine.

Thanks,
Eric
Top achievements
Rank 2
 answered on 28 Aug 2012
2 answers
191 views
I have a little snippit of code to create a kendo grid declaratively:

<div id="sitesGrid" data-role="grid" style="width: 800px;"
                 data-sortable="true"
                 data-columns='[{ "field": "accountName", "title": "Account", "width": "150px" }, 
                { "field": "subAccountName", "title": "Sub Account", "width": "180px" }, 
                { "field": "siteName", "title": "Site", "width": "150px" }, 
                {"field": "checkedout",  "title": "Check Out",  "width": "80px"}]'
                data-source="AuroraSurveyTool.lovs.siteList">
            </div>

I would like to have a CheckBox button in the 'Checkedout' field.   How do I do that?  I tried using a template but could not get it configured in any way that was acceptable.
Stanley
Top achievements
Rank 1
 answered on 28 Aug 2012
4 answers
871 views
Im having trouble with the combobox as a custom editor. Populating the values are fine, however when selected the entire object (from the combobox) of the row is put into the bound field. This displays itself as [object Object]
Ive copied the column from the demo http://demos.kendoui.com/web/grid/editing-custom.html as is acting the same strange way that my own field does.
[update solving problems while going along]

Ive had similar problems before but just changed how it was populated. This works fine:
var proxyDropDownEditor = function(container, options){
    var data = [
        { text: "none" },
        { text: "HTTP" },
        { text: "CONNECT"},
        { text: "best" }
    ];
    $('<input data-bind="value:' + options.field + '"/>')
        .appendTo(container)
        .kendoDropDownList({
            dataTextField: "text",
            dataValueField: "text",
            dataSource: data
        });   
};

This is the one I need working:
The editor of the cueCollection is:
function cueCollectionEditor(container, options){
    var dataSource = new kendo.data.DataSource({
        type: "json",
        transport: {
            read: "/OrchardLocal/Nyx/EditCueCollection/List?ContentId=29"
        },
        schema: {
            model: {
                id: "Id"
            }
        }
    });
    $('<input data-text-field="Name" data-value-field="Id" data-bind="value:' + options.field + '"/>')
        .appendTo(container)
        .kendoDropDownList({
            autoBind: false,
            dataSource: dataSource
    });
 
    //$('<input name="' + options.field + '"/>')
    //    .appendTo(container)
    //    .kendoDropDownList({
    //        autoBind: false,
    //        dataTextField: "id",
    //        dataValueField: "id",
    //        dataSource: options
    //});   
}

but it currently has two problems. Clicking on any item it will select correctly and display correctly (in edit row) until finishing with row and clicking update. The first time this it is done the row will display "[object Object]" with the save method showing me the values of the model:
Category
    Object { __metadata={...}, CategoryID=4, CategoryName="Dairy Products", more...}
cueCollection
    Object { Id=4, Name="Carousel 2"
dirty:
    false
proxyType:
    "best"
other fields are excluded as they are just general columns and are working as expected. Im expecting the category to be populated as "Dairy Products" and cueCollection to be "4".

These are the columns:
{ field: "cueCollection", title: "Cues", editor: cueCollectionEditor
    //template: kendo.template($("#cueCollectionColumnTemplate").html())
},
{ field: "Category", width: "150px", editor: categoryDropDownEditor },
{ field: "proxyType", title: "Proxy Type", editor: proxyDropDownEditor },
{ command: ["edit", "destroy"], title: " ", width: "210px" }

Schema
schema: {
    model: {
        id: "title",
        fields: {
            title: { type : "string", nullable: false },
            proxyType: { type: "string", defaultValue: "best" },
            position : { type: "number", defaultValue: 0 },
            cueCollection: { type: "number" },//changing the type to number removed the viewmodel from being returned 
            Category: { type: "string" }    //changing the type to string fixed it from being a object returned to the correct value
        }
    }
}
changing the field type of "Category" to a string seemed to have fixed its return value from the edit row. cueCollection was not so lucky.

the ajax response for the dropdown list is nothing too special:
[{"Id":2,"Name":"collection1"},{"Id":4,"Name":"collection2"}]

Overall my aim would be to add the entire json object into the column: {"Id":2,"Name":"collection1"}
as it would be easier to navigate and understand in its future context. Seeing that this is what it is giving me lets roll with it, although im expecting just the id field.

Back on track:
lets skip trying to get just the id, as the object looks far more exciting.
datasource - schema - model - cueCollection
lets give it a default so that creating a new row doesnt break so easily.
cueCollection: { defaultValue: { Id:0, Name: "" } },
combobox data result
[{"Id":2,"Name":"collection1"},{"Id":4,"Name":"collection2"}]

selecting the first item and clicking on the update row it will appear as undefined (one of the problems i had earlier but hadnt really noted).
selecting the second will populate cueCollection as expected (as observed). Clicking update will set the field as [object][object] so lets add a client template.
...
function templateCollection(mModel){
        if(!mModel)
            return "none selected";
        return mModel.Name;
    }
</script>   
<script id="cueCollectionColumnTemplate" type="text/x-kendo-tmpl">
    #: templateCollection(cueCollection) #
</script>
how the column looks in the grid definition:
{ field: "cueCollection", title: "Cues",
    editor: cueCollectionEditor,
    template: kendo.template($("#cueCollectionColumnTemplate").html())
},

current problems:
selecting the first item doesn't work. Lets try adding the option label to see if it is just that first field.
$('<input data-bind="value:' + options.field + '"/>')
    .appendTo(container)
    .kendoDropDownList({
        dataTextField: "Name",
        dataValueField: "Id",
        autoBind: false,
        dataSource: dataSource,
        optionLabel: "Select..."
});
... *scratches head* ... selecting any item is causing problems now. As it has now decided on binding the "Id" value and now losing the object. This is turning into one of those get what you want at the wrong time scenarios.

Interesting. Adding in the option-label fixed the data bind issue, but broke how I was now expecting it. So now I need the data row value instead of a data field value.

Ok now quite confused. It is now selecting the object again.
Ive changed the editor to:
var hiddenBox = $('<input type="hidden" data-bind="value:' + options.field + '"/>').appendTo(container);
var box = $('<input data-bind="value:' + options.field + '"/>')
    .appendTo(container);
 
var kendoDropDown = box.kendoDropDownList({
        dataTextField: "Name",
        dataValueField: "Id",
        autoBind: false,
        dataSource: dataSource,
        optionLabel: "Select..."
});

however the action of the dropdown has gone back to selecting the object over the Id

Can anyone describe what is going on with the dropdown. Static datasources seem to bind perfectly well, but ajax based data sources seem to be giving me the run around. It seems a little random now when it wants to select the Id or select the Object.

Any insight would be wonderful as I've spent far too long trying to get the dropdown to act consistently.

Thanks,
Matt
Matthew
Top achievements
Rank 1
 answered on 28 Aug 2012
1 answer
67 views
hello,
 who can tell me ,why the arrow just only one...please
Dimo
Telerik team
 answered on 28 Aug 2012
0 answers
109 views
When I preselect an item on the DropDownList using .search() method, the change event seems not to fire up after selecting first position. How can I fix that? 
Mikolaj
Top achievements
Rank 1
 asked on 28 Aug 2012
3 answers
219 views
I know this should be easy, but I'm having a hell of a time trying to get my remote data source working with templates. Can you give a quick example of how to bind a json datasource to a template (not inline)? Thanks!

I've tried all of the demos online, but none seem to work as I'd expect.
d2uX
Top achievements
Rank 1
 answered on 28 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
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?