Telerik Forums
Kendo UI for jQuery Forum
0 answers
95 views
See

http://www.kendoui.com/forums/framework/data-source/json-error.aspx

Duncan
Top achievements
Rank 1
 asked on 07 May 2012
0 answers
118 views
How would I bind a tooltip to each combobox item using a json datasource?
Andrew
Top achievements
Rank 1
 asked on 07 May 2012
5 answers
582 views
In version v2011.3.1413, I had dates in a JSON data structure (returned by a WCF data service) of the form:

        "date":"1910-12-09T08:32:26",

I display the datasource a grid, and it sorted things properly (I am not sure if was just relying on string alphabetic sort or was really understanding the date format.

I specified, in the datasource schmea the following: (whhere I have two date fieds (date: and egplDate:)

model:{
    fields:{
        idx:{ type:"string" },
        classification:{ type:"string" },
        creator:{ type:"string" },
        date:{ type:"string" },
        elevation:{ type:"number" },
        datum:{ type:"string" },
        size:{ type:"number" },
        type:{ type:"string" },
        description:{ type:"string" },
        dirLocation:{ type:"string" },
        distributor:{ type:"string" },
        egplDate:{ type:"date" },
        handling:{ type:"string" },
        product:{ type:"string" },
        uniqID:{ type:"string" }
    }

In the Grid I do dipslay as follows:

columns:[
    {
        field:"creator",
        width:220
    },
    {
        field:"date",
        width:170
    }, (// etc.)

As I said this worked fine.

But I am now using the latest version of UI complete: v2012.1.423

and I see the date column in the GRID as "null".

If change the datasource schema model to string, then sorting works fine:
                    date:{ type:"string" },


Dr.YSG
Top achievements
Rank 2
 answered on 07 May 2012
0 answers
209 views
Using v2012.1.322, you may run into a few errors when compiling from kendo source on Google's Closure Compiler. Here's how I fixed mine.

1) Closure compiler doesn't like the use of 'short' as a variable name as it thinks of it as a reserved word that is a declaration of short integer. To fix I just renamed 'short' to 'shortDays' on Line 11701 and 11710:

11701:      shortDays = shiftArray(days.namesShort, firstDayIdx),
...
11710:      html += '<th abbr="' + abbr[idx] + '" scope="col" title="' + names[idx] + '">' + shortDays[idx] + '</th>';

2) The compiler doesn't like duplicate variable names in function's prototype or signature, specifically the use of 'textStatus' twice on Line 33650 in the onError handler. To fix I renamed the second instance to errorThrown.

...
33650:     function onError(xhr, textStatus, errorThrown) {
...

With those changes, the compiler should successfully minify and obfuscate the javascript.
Matt
Top achievements
Rank 2
 asked on 07 May 2012
6 answers
872 views
I am testing out these new widgets and am attempting to use the popup edit mode with a grid and am not having any luck.
The grid is showing the value I need it to show the text.
The popup drop list is not selected when it pops up.
Once selected and click update it does not reflect the change in the grid.

Please let me know the way to do this I am using ASP.NET MVC 3, jquery 1.7.1 and KendoUI 2012 Q1.

var crudServiceBaseUrl = "/Admin/",
        dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: crudServiceBaseUrl + "UserEditorRead",
                    dataType: "json",
                    type: "POST"
                },
                update: {
                    url: crudServiceBaseUrl + "UserEditorUpdate",
                    dataType: "json",
                    type:"POST"
                },
                destroy: {
                    url: crudServiceBaseUrl + "UserEditorDestroy",
                    dataType: "json",
                    type: "POST"
                },
                create: {
                    url: crudServiceBaseUrl + "UserEditorCreate",
                    dataType: "json",
                    type: "POST"
                },
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }
            },
            batch: true,
            pageSize: 30,
            schema: {
                model: {
                    id: "UserID",
                    fields: {
                        UserID: { editable: false, nullable: true },
                        UserFirstName: { editable: true, validation: { required: true} },
                        UserLastName: { editable: true, validation: { required: true} },
                        UserGroupID: { editable: true, validation: { required: true} },
                        UserLastActivityDate: { editable: false, type: "date" },
                        UserCreateDate: { editable: false, type: "date" }
                    }
                }
            }
        });
 
        $("#gridUserManage").kendoGrid({
            dataSource: dataSource,
            pageable: true,
            height: 600,
            toolbar: ["create"],
            columns: [
            { title: "ID", field: "UserID", width: 40 },
            { title: "First", field: "UserFirstName", width: 100 },
            { title: "Last", field: "UserLastName", width: 100 },
            { title: "Group", field: "UserGroupID", width: 200,
                editor: function (container, options) {
                    $('<input name="' + options.field + '"/>').appendTo(container).kendoComboBox({
                        dataSource: new kendo.data.DataSource({
                            data: [
                                { Id: "1", title: "Guest" },
                                { Id: "2", title: "Employee" }
                            ]
                        }),
                        dataValueField: "Id",
                        dataTextField: "title",
                        autobind: false
                    });
                }
            },
            { command: ["edit", "destroy"], title: " ", width: "210px"}],
            editable: { mode: "popup", confirmation: false },
            remove: function (e) {
                // also can we e.cancel=true here?
            }
        });
Juan
Top achievements
Rank 1
 answered on 07 May 2012
0 answers
88 views
Hi i have a question is posible add style to columns in grid?
Ricardo
Top achievements
Rank 1
 asked on 07 May 2012
8 answers
406 views
I have a fairly complex MVVM configuration that looks like the following:

ViewModel
    Groups
       Sections
           Rows

So, my view model contains groups, which contain sections, which contain rows. MVVM and data-templating is perfect for this type of scenario, but I'm hitting a few stumbling blocks trying to use Kendo's MVVM implementation.

Specifically, when I render a Row, I need to include a button to delete that row. Templating this is simple enough to do and I bind the click event handler to a removeRow function.

This is where I have two questions:

1) Can the removeRow function exist on my Section model instead of the root view model? I've tried to do this and it doesn't seem to work.

2) If removeRow must be on the root view model, is there a method of determining which Section the row existed in? Right now, at the root view model, I'd have to search through all groups, and then all sections, and then all rows to find out which array contains the row specified by e.data. Can I provide an additional parameter to be passed to my removeRow event handler that specifies the containing section?

Thanks

Brian Vallelunga
Top achievements
Rank 1
 answered on 07 May 2012
1 answer
103 views
I am having trouble trying to get value from the following sample json

[{"released":"2007-06-29","posters":[{"image":{"type":"poster","size":"thumb","height":118,"width":92,"url":"http://cf2.imgobject.com/t/p/w92/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}},{"image":{"type":"poster","size":"w154","height":197,"width":154,"url":"http://cf2.imgobject.com/t/p/w154/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}},{"image":{"type":"poster","size":"cover","height":237,"width":185,"url":"http://cf2.imgobject.com/t/p/w185/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}},{"image":{"type":"poster","size":"w342","height":439,"width":342,"url":"http://cf2.imgobject.com/t/p/w342/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}},{"image":{"type":"poster","size":"mid","height":641,"width":500,"url":"http://cf2.imgobject.com/t/p/w500/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}},{"image":{"type":"poster","size":"original","height":854,"width":666,"url":"http://cf2.imgobject.com/t/p/original/gMg48r3zMz6HMez4ksNEeOcrVV1.jpg","id":"4ea680f32c058837cb00c499"}}],"backdrops":[],"version":225,"last_modified_at":"2012-04-30 18:27:15 UTC"}]


How can I get the value of the "url" under "posters".  I thought this would work "posters[0].image.url" but it does not work....desperate for an answer.  Trying to meet contest deadline.
Duncan
Top achievements
Rank 1
 answered on 07 May 2012
0 answers
94 views
hello
is possible with some method that a grid is not editable is editable?
Thanks in advance.
Greetings!
Ricardo
Top achievements
Rank 1
 asked on 07 May 2012
11 answers
200 views
I am using the MVVM and Datasource frameworks with the Kendo UI controls, so the control is bound via MVVM to a shared datasource. This works well with all controls when updating values. It even works fine when completely deleting values of text-like controls. The issue is with numeric or date controls, where empty string is a violation, thus NULL is used.

So for DatePicker and NumericTextBox, when a value is already present, selecting the text in the control thru the UI and deleting it, does not update the underlying datasource. Thru inspection and walking code, I can see that the controls do indeed have their value set to NULL, so it appears to be in the observer and not the controls.

Anyone else unable to delete values successfully or is this just me??

Thanks!
Mike
Rosen
Telerik team
 answered on 07 May 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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?