Telerik Forums
Kendo UI for jQuery Forum
4 answers
828 views
I am getting the error: Uncaught TypeError: Cannot read property 'field' of undefined 

in the kendo.all.min.js file when trying to post a view model with nested objects. 

I have created a jsfiddle to repro the issue, I don't think I'm describing it very well, so take a look, it is short.

http://jsfiddle.net/bNBUP/ 

Any ideas?
Thanks,
Gary 
Atanas Korchev
Telerik team
 answered on 04 Jun 2012
1 answer
141 views
With this data source configuration .read() does not seem to be passing &group= and &subgroup= assignments to the server.  

var spaceSeasonDS =
new kendo.data.DataSource({
    transport: {
        read: {
            url: window.stpURL + "/SpaceAttribute",
            dataType: 'xml',
            data: {
                action: 'getSeasons',
                group: function(){
                    return spaceGroup.value()
                },
                subgroup: function(){
                    return spaceSubgroup.value()
                }
            },
            cache: false,
            complete: onReadComplete_Season
        }
    },
    schema: {
        type: "xml",
        data: "/TABLE/SEASONS",
        model: {
            fields: {
                item: "item/text()"
            }
        }
    },
    error: raiseXmlDsErrorWindow
});



Should 
data: {
    action: 'getSeasons',
    group: function(){
        return spaceGroup.value()
    },
    subgroup: function(){
        return spaceSubgroup.value()
    }
},

be this instead ?

data: function() {
return {
        action: 'getSeasons',
        group: spaceGroup.value(),
        subgroup: spaceSubgroup.value()
}},
Alexander Valchev
Telerik team
 answered on 04 Jun 2012
0 answers
106 views
Dear All,

If I have developed web application using kendo ui. i can use same code to mobile application or i want use different separate code? and what is the main features available in kendo ui compare to others.

Thanks in Advance..!
Susi
Top achievements
Rank 1
 asked on 03 Jun 2012
2 answers
291 views

Hello,
I'm new to Kendo.
I'm trying to implement the following example:
http://demos.kendoui.com/web/grid/editing-inline.html
My server side code is ASP.Net

The problem is that while clicking new/update/delete inline options, i get a request to the server, to the relevant web method, however
no parameters are passed (the request object is empty).

Here is the client side code:
//////////////////////////////////////////////// Ready evet - Datasource
    $(document).ready(function () {
        var MydataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "HttpHandler.aspx/Line2AOIGetData",
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json"
                },
                update: {
                    url: "HttpHandler.aspx/Line2AOIUpdate",
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json"
                },
                destroy: {
                    url: "HttpHandler.aspx/Line2AOIDelete",
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json"
                },
                create: {
                    url: "HttpHandler.aspx/Line2AOICreate",
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json"
                },
                parameterMap: function (options, operation) {                   
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }
            },
            batch: false,
            pageSize: 5,
            schema: {
                data: 'd',
                model: {
                    id: "LineName",
                    fields: {
                        LineName: { editable: true, nullable: false, validation: { required: true} },
                        Equipmentname: { editable: true, nullable: false, validation: { required: true} }
                    }
                }
            }
        });

        //////////////////////////////////////////////// Grid
        $("#theGrid").kendoGrid({
            dataSource: MydataSource,
            pageable: true,
            toolbar: ["create"],
            columns: [{ title: "Line", field: "LineName", width: "200px" },
                    { title: "AOI Machine", field: "Equipmentname", width: "200px" },
                     { command: ["edit", "destroy"], title: " ", width: "250px"}],
            editable: "inline",
            scrollable: false
        });
    });

Please advice.
Tnx

Mentor Graphics
Top achievements
Rank 1
 answered on 03 Jun 2012
0 answers
160 views
I've got a hierarchical menu.
I've put on it hander for select via:
select: function(e){alert(e.item.innerText);{

This works great for getting the text of the item that I selected, but
what I really want is to ALSO get the text of the parent menu item (if there is a parent menu item).
Returnng an array of strings would be good, but one string with a known separator between items would be ok too.

thanks!
Christopher
Top achievements
Rank 1
 asked on 03 Jun 2012
3 answers
362 views
I am trying to use a ASP.NET Webservice with KendoUI Datasource. For example:

$("#grid").kendoGrid({
    dataSource: {
        data:airports,
        schema: {
            data: 'd'
        }
    },
    columns: [
        {
            field: "airportName",
             
        },
        {
            field: "airportCode"
        }
    ]
});​

The problem is that the json being returned is:
d: "[{"airportName":"BDL:Bradley International Airport, CT","airportCode":"BDL"},{"airportName":"HVN:Tweed New Haven Regional Airport, CT","airportCode":"HVN"},{"airportName":"EWR:Newark Liberty Intl, NJ","airportCode":"EWR"},{"airportName":"HPN:Whiteplains Airport,NY","airportCode":"HPN"},{"airportName":"JFK:John F. Kennedy Intl,NY","airportCode":"JFK"},{"airportName":"LGA:La Guardia Airport,NY","airportCode":"LGA"}]
};"

Note the quote after the d:
This is being added by the Webservice because I am using Newtonsoft.Json.JsonConvert.SerializeObject to create the json. I am using Newtonsoft because I have not found a was to serialize a generic List object.

So the question is:
1. How do I get DataSource to work with the quoted results?
or
2. How do I get the webservice to not to quote the results?

The Webservice code is:
[WebMethod()]
public string GetAirportList()
{
    List<Airport> Airports = new List<Airport>();
    Airports.Add(new Airport {
        airportCode = "BDL",
        airportName = "BDL:Bradley International Airport, CT"
    });
    Airports.Add(new Airport {
        airportCode = "HVN",
        airportName = "HVN:Tweed New Haven Regional Airport, CT"
    });
    Airports.Add(new Airport {
        airportCode = "EWR",
        airportName = "EWR:Newark Liberty Intl, NJ"
    });
    Airports.Add(new Airport {
        airportCode = "HPN",
        airportName = "HPN:Whiteplains Airport,NY"
    });
    Airports.Add(new Airport {
        airportCode = "JFK",
        airportName = "JFK:John F. Kennedy Intl,NY"
    });
    Airports.Add(new Airport {
        airportCode = "LGA",
        airportName = "LGA:La Guardia Airport,NY"
    });
    return Newtonsoft.Json.JsonConvert.SerializeObject(Airports);
}

Please help. (I've been tearing my hair out for two days on this).

-George


Isaac
Top achievements
Rank 1
 answered on 02 Jun 2012
0 answers
275 views
I currently have a working grid with inline editing. I need validation that needs to be done on the server side. Using clientside unobtrusive validation is a perfect user experience, but server side modelstate errors aren't so intuitive.

Currently, lets say you leave a required field empty and it is validated server side. The grid will change back to read-only appearing that is was a valid save, but the error handle gets called for you to display the error how you like. Then if you edit the row again and cancel, the original value comes back.

I'd like to see better default handling of validation errors. Currently, the json result comming back with the update has a field name and errors. We should at minimum add an error class to the row indicating it wasn't saved, and maybe even the td for the given field.

If the error handler had a reference to the tr that handled the error, I can manually add my own error class, but that currently isn't possible, is it?
Paul
Top achievements
Rank 1
 asked on 02 Jun 2012
0 answers
117 views
i`m a Apple fans, when i know Kendo UI , i decide to use it ,  it look like Mac theme, so cool , and now i used Jquery UI and JqGrid in our current project
i have a problem about our Grid .
How(When) can i get the function that are "filterToolbar" and "setFrozenColumns" in our Grid? it is very inportant. JqGrid both have .
if not ,can i use Kendo UI with Jquery UI and JqGrid together?

thanks,
best regards
Gavin
Top achievements
Rank 1
 asked on 02 Jun 2012
12 answers
904 views
I have a Grid bound to a remote JSON data source. Works great.

But when I try to bind the chart below to the same datasource, The entire application stops working (I only see  the blue background of the page).

1. Is there a way to turn off autobinding (like a grid) so that I can step through and see what is going on?
2. How would I do a late binding (given that I have the handle  = $(#chart).kendoChart().

Did I do something wrong in creating this chart?

function buildChart() {
    $("#chartPane").kendoChart({
        title: {
            text: "Type by Distributor"
        },
        dataSource: {
            data: queryData
        },
        seriesDefaults: {
            type: "column"
        },
        series: [{
            field: "size",
            name: "size"
        }],
        categoryAxis: {
            field: "distributor",
            labels: {
                rotation: -90
            }
        }
    });
}
Engifaar
Top achievements
Rank 1
 answered on 02 Jun 2012
1 answer
201 views
I have created Kendo Grid datasource and want to set updated data object to it
for that i written following code as

//get reference of created grid
var grid = $("#admin-grid-todo").data("kendoGrid");

//to set data to referenced grid
grid.dataSource.data(
                   dataFromAjax
                );


I get dataFromAjax as String object from Ajax call so that it will gives error as ID is not defined
dataFromAjax is in format of [{ID:'1',NAME:'job1'},{ID:'2',NAME:'job2'}]

If i write hard coded dataFromAjax as
var dataFromAjax = [{ID:'1',NAME:'job1'},{ID:'2',NAME:'job2'}];
It will works fine.

I want to know is there any way to get data as object from Ajax return call

Thanks,
Nilesh Mantri
Nilesh
Top achievements
Rank 1
 answered on 02 Jun 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?