Telerik Forums
Kendo UI for jQuery Forum
0 answers
187 views
Hi,

I had quite some trouble to get the grid to bind to json data returned by a WCF service hosted on IIS 7. The following works for me:
                $.ajax({
                    dataType: 'json',
                    type: 'POST',
                    contentType: 'application/json; charset=utf-8',
                    data: '{}',
                    url: 'api/dsl',
                    success: function (data) {
                        $("#grid").kendoGrid({
                            dataSource: {
                                data: data,
                                pageSize: 10
                            },
                            height: 750,
                            groupable: true,
                            scrollable: true,
                            sortable: true,
                            filterable: true,
                            pageable: true,
                            autobind: true
                        });
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        alert("error: " + textStatus + ": " + jqXHR.responseText);
                    }
                                });
It seems i need to specify contenttype and data in order to have jquery play nice with IIS 7 (this post helped me: http://encosia.com/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/). It all started to work for me then when I set those properties on the ajax call.

Now I would like to use the datasource property in the kendogrid rather than using the ajax success callback. Is there any way to achieve this?

Kind regards,

Roel Hans
Roel Hans Bethlehem
Top achievements
Rank 1
 asked on 29 Dec 2011
4 answers
217 views
Hi,

What reference do I use in this line of code to reference the content area of RadEditor?

Thanks, 

Donald
$("#autoCompleteInput").kendoAutoComplete({
Atanas Korchev
Telerik team
 answered on 29 Dec 2011
3 answers
337 views
hi all:
i want use other jsp page return json object  as follows ["Item1", "Item2", "Item3"];
,so i Should how to change the code?
$("#autocomplete").kendoAutoComplete({
   minLength
: 3,
   dataTextField
: "Name", //JSON property name to use
   dataSource
: new kendo.data.DataSource({
       type
: "odata", //Specifies data protocol
       pageSize
: 10, //Limits result set
       transport
: {
           read
: "http://odata.netflix.com/Catalog/Titles"
       
}
   
})
});
i want use json data,not odata,pls help me ,thanks.

Seaman
Top achievements
Rank 1
 answered on 29 Dec 2011
1 answer
231 views
Is it possible to have a cancel button that closes the window?
Kamen Bundev
Telerik team
 answered on 29 Dec 2011
4 answers
264 views
I am having some troubles binding my chart. I am trying to create a datasource that is bound to my mvc3 controller

Basically I am trying to dynamically bind the series. As I dont know what the values are going to be.

The controller is called and the json is returned however nothing is shown in the graph.
What am I doing wrong? I am not getting any javascript errors.
 

  <script>
        $(document).ready(function () {
            setTimeout(function () {
                createChart();
            }, 400);
            $(document).bind("kendo:skinChange", function (e) {
                createChart();
            });
        });
 
        function createChart() {
            var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "/MyService/GetGraph",
                        dataType: "json"
                        // additional parameters sent to the remote service
//                        data: {
//                            q: "html5"
//                        }
                    },
                    group: {
                        field: "TransactionTypeName",
                        dir: "asc"
                    }
                }
            });
            dataSource.read();
 
            $("#chart").kendoChart({
                theme: $(document).data("kendoSkin") || "default",
                dataSource: { data: dataSource },
                title: {
                    text: "Transaction Details"
                },
                legend: {
                    position: "bottom"
                },
                seriesDefaults: {
                    type: "column"
                },
                series:
                        [{
                            field: "TransactionAmount",
                            name: "Transaction Name"
                        }],
                categoryAxis: {
                    field: "MonthString",
                    labels: {
                        rotation: -90
                    }
                },
                valueAxis: {
                    labels: {
                        format: "{0:N0}"
                    }
                },
                tooltip: {
                    visible: true,
                    format: "{0:N0}"
                }
            });
        }   
      
    </script>
Naveen
Top achievements
Rank 1
 answered on 29 Dec 2011
0 answers
120 views
I'm creating a table and have applied HTML5 Data tags to each table element like this:
<tr data-sku="SOME DATA HERE">

To determine what was clicked, I have a function that handles the change events of my grid:
function onGridClick(arg) {
            var selected = $.map(this.select(), function (item) {
                return $(item).text();
            });
 
            // do something
        }

Doing something like this doesn't work?
$(item).attr('data-sku')

When debugging my JS script in Visual Studio, viewing all the properties for 'item', there is no mention of the data tag mentioned? Are they being removed by Kendo?
Gabriel
Top achievements
Rank 1
 asked on 29 Dec 2011
2 answers
87 views
If you take a look at http://demos.kendoui.com/web/grid/toolbar-template.html, you can see the bottom of the grid where the paging controls live that the line on the bottom is absent.

This only happens when using the toolbar in a grid.

Does anyone know how to fix this?
Gabriel
Top achievements
Rank 1
 answered on 28 Dec 2011
2 answers
129 views
It seems that the current filters are set up on dataSource to do an AND when I apply a filter across multiple fields. By this, I mean result rows shows up only if the data exists in all the fields specified in the filter.

Is it possible for results to be displayed if just one of the fields in the filter match?

Example: http://jsfiddle.net/ZpCAy/27

A search for 'Vins' does not present any results.
Joel
Top achievements
Rank 1
 answered on 28 Dec 2011
2 answers
518 views
Can someone supply a brief example of proper syntax for defining and accessing aggregates on a datasource?   I am unable to access any aggregates results (function keeps returning UNDEFINED).   I must be missing something trivial.  Modified fiddle sample I am experimenting with:

http://jsfiddle.net/divotfixer/QwQwF/
Andrew
Top achievements
Rank 1
 answered on 28 Dec 2011
2 answers
1.9K+ views
I know we can add custom buttons to toolbar of kendo grid but I coul not find how to add click event listener to these custom buttons ?

TIA
Cagatay
Top achievements
Rank 1
 answered on 28 Dec 2011
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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?