Telerik Forums
Kendo UI for jQuery Forum
0 answers
120 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
340 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
256 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
108 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
880 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
187 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
2 answers
156 views
Is there a way to have a shared datasource, but then define the grouping when the datasource is being used?  For example I have the following datasource that is shared by two different pages

var vendorAlphaDS = kendo.data.DataSource.create({
                                     transport: {
read: {
url: "http://localhost/~termleech/conference/vendors/all",
dataType: "json"
}
     }
});

I have this used by two different pages, but each page is grouped differently.  So rather than have two difference datasources each with the different grouping, I was wondering if I could just add the grouping to the datasource dynamically.
Engifaar
Top achievements
Rank 1
 answered on 02 Jun 2012
3 answers
340 views
I don't think placeHolder work. The default message never appears when value is blank.
Sample Code
Harsh
Top achievements
Rank 1
 answered on 01 Jun 2012
0 answers
114 views
i had posted a question if a placeholder could be added to the grid edit.
However i found out that i could do this using grid edit event and html5 placeholder attribute.Thanks
Harsh
Top achievements
Rank 1
 asked on 01 Jun 2012
2 answers
257 views

Here's my grid configuration:

            gridItems.kendoGrid({
                selectable: "row",
                scrollable: true,
                pageable: false,
                sortable: true,
                filterable: false,
                rowTemplate: kendo.template($("#gridItemsRowTemplate").html()),
                dataSource: {
                    data: data
                },
                columns: columns,
                editable: "inline",
                toolbar: ["create", "save", "cancel"],
                navigatable: true
        });

I've had to add the following code in order to get my grid into edit mode:

            $("#gridItems td").click(function() {
                if (!$(this).closest('tr').hasClass('k-grid-edit-row')) {
                    costingSheetItems.data("kendoGrid").editRow($(this).closest('tr'));

                    // remove spinner controls from numeric textboxes
                    var numericWrapper = $("#gridItems td").find(".k-numeric-wrap")

                    numericWrapper.find(".k-select").hide();
                    numericWrapper.addClass("expand-padding");
                }
            });


BUT, once it is in edit mode after I click on a row, if I type a new value into a cell and press Tab, the grid leaves edit mode and I can't get it back into edit mode.

Jerry

Jerry T.
Top achievements
Rank 1
 answered on 01 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
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?