Telerik Forums
Kendo UI for jQuery Forum
1 answer
104 views
We are using the grid in a MVC app. I can get the Read, Update and Delete functions to work without issue. However every time we try to do an insert the entity being passed to the controller is null. Here is the code:

OData Controller:
protected override BroadcastEventViewModel CreateEntity(BroadcastEventViewModel entity)
        {
            var bcEvent = new Model.BroadcastEvent()
            {
                Id = entity.Id,
                Name = entity.Name,
                StartDate = entity.StartDate,
                EndDate = entity.EndDate
            };
            _repository.InsertBroadcastEvent(bcEvent);
            return entity;
        }
Index.cshtml:
var crudServiceBaseUrl = "/odata/BroadcastEvents";
        var pledgesModel = kendo.observable({
            dataSource: broadcastEventDataSource = new kendo.data.DataSource({
                type: "odata",
                transport: {
                    create: {
                        url: crudServiceBaseUrl,
                        dataType: "json",
                    },
                    read: {
                        url: crudServiceBaseUrl,
                        dataType: "json"
                    },
                    update: {
                        url: function (data) {
                            return crudServiceBaseUrl + "(" + data.Id + ")";
                        },
                        dataType: "json"
                    },
                    destroy: {
                        url: function (data) {
                            return crudServiceBaseUrl + "(" + data.Id + ")";
                        },
                        dataType: "json"
                    }
                },
                batch: false,
                serverPaging: true,
                serverSorting: true,
                serverFiltering: true,
                pageSize: 5,
                schema: {
                    data: function (data) {
                        return data.value;
                    },
                    total: function (data) {
                        return data["odata.count"];
                    },
                    errors: function (data) {
                    },
                    model: {
                        id: "Id",
                        fields: {
                            Id: { type: "number", editable: false, nullable: true },
                            Name: { type: "string" },
                            StartDate: { type: "datetime" },
                            EndDate: { type: "datetime" },
                        }
                    }
                },
                error: function (e) {
                    var response = e.xhr.responseJSON;
                    var message = response.Message;
                    //if (e.xhr.responseJSON["odata.error"].Message != null) {
                    //    message = e.xhr.responseJSON["odata.error"].Message;
                    //}
                    alert(message + "\n\n");
                }
            })
        });
 
        $("#broadcastEventGrid").kendoGrid({
            dataSource: broadcastEventDataSource,
            toolbar: ["create", "save", "cancel"],
            sortable: false,
            pageable: true,
            filterable: false,
            columns: [
               { field: "Id", title: "ID", width: 150 },
               { field: "Name", title: "Name", width: 200 },
               { field: "StartDate", title: "Start Date", width: 200 },
               { field: "EndDate", title: "End Date", width: 200 },
               {
                   command: ["edit", {
                       name: "Details",
                       click: function (e) {
                           // var tr = $(e.target).closest("tr");
                           //var data = this.dataItem(tr);
                           alert("Details for: " + e.target);
                       }
                   }], title: "Action",
               }
            ],
            editable: {
                createAt: "bottom",
                mode: "inline"
            }
        });
I have found tons of articles and examples using the ActionLinks, but nothing that would seem to tell me why this call to Create would not work.

Thanks for any help you can provide.
Chuck
Nikolay Rusev
Telerik team
 answered on 23 Sep 2013
1 answer
8.3K+ views
I want to make select first item on dropdownlist.


so, after item has bounded, I tried this.

$("#CATEGORY_CODE").data("kendoDropDownList").select(0);

and I tried to check the value,
alert($#CATEGORY_CODE").val());
alert($("#CATEGORY_CODE").data("kendoDropDownList").value());

but I could see "null" and "undefined" messages.

What's wrong? anyone please let me know.
Shirley
Top achievements
Rank 1
 answered on 23 Sep 2013
4 answers
1.1K+ views
Hi,  I am using the kendoComboBox as well, a combo box.  I need to be able to limit users input length to a number of characters, just like I do on my other input boxes.  There doesn't appear to be a maxLength parameter for the comboBox.  I'm guessing that I must be missing something.  Can someone help?
Jay
Top achievements
Rank 2
 answered on 20 Sep 2013
2 answers
1.2K+ views
I've been trying to hookup a AutoComplete widget. It's failed every time I've tried it with the error "a.ToLowerCase is not a function"

So I added a Grid and bound the same data and it worked as expected. What could be the issue with AutoComplete?


error is
a.toLowerCase is not a function
Line 1

local data is 
var myData = [{
    "ID": 8,
    "Title": "Test Title",
    "Ends": "5/30/2011 6:00:00 PM"
}, {
    "ID": 37,
    "Title": "Test Title 2"
}];

The code is 
$("#autocomplete").kendoAutoComplete({
                dataSource: myData
            });
 
$("#grid").kendoGrid({
                columns: [
              {
                  field: "ID",
                  title: "ID",
                  width: "10"
              },
              {
                  field: "Title",
                  title: "Title"
              },
              {
                  field: "Ends",
                  title: "Ends"
              }],
                dataSource: {
                    data: myData,
                    pageSize: 5
                },
                sortable: true,
                pageable: true
            });

achmad
Top achievements
Rank 1
 answered on 20 Sep 2013
1 answer
126 views
Hi ,

We are getting a JSON object ( sample attached ) and wants to create the multiple value Axes and Series from this JSON object for a line chart in Javascript file.

We want to somehow access the chart object and will like to programming in API manner .
Something like this .

chart.option.(addvalueaxis1) -- set it all properties like line color/alighment/name etc.
chart.option.(addvalueaxis2) -- set it all properties like line color/alighment/name etc.
chart.option.(addvalueaxis3)-- set it all properties like line color/alighment/name etc.

chart.option.(addseries1) -- set it all properties like title/valueField/valueAxis
chart.option.(addseries2) -- set it all properties like title/valueField/valueAxis
chart.option.(addseries3)-- set it all properties like title/valueField/valueAxis

CategoryAxis is date type returned in JSON object .

The Json object send the data for all days in the year.
We will pick the RPM value for day1,day2,day3 based on our calculation , in attached json object for day1 it will be ( FY14_Bing_RPM_ActualMetricValue, FY13_Bing_RPM_ActualMetricValue). Here RPM will become our first value axis. these values will form the first series.

The attached JSON object has array of 4 days.
can you please help.
T. Tsonev
Telerik team
 answered on 20 Sep 2013
1 answer
96 views
Hi

I am using bar and column charts to represent my data. The issue is when the data is large, the number of bars increases and is difficult to view the data. when i view in iphone it  is still worse. i used pan and zoom for the bar chart but it is ok in browsers and not in iphone(Drag is difficult in iphone). the pan and zoom is also not working fine for column charts. can you provide me with a solution?
Hari
Top achievements
Rank 1
 answered on 20 Sep 2013
2 answers
96 views
Hi everybody, 

I'm using a grid with both keyboard navigation and details Lines. Pressing the enter key open/close the detail Line in every cases even if a cell of the main line is focused or in edition mode.
I would like to set the enter key action to:
-open/close the detail line when the detail line arrow is focused
-go in edition or validate the edition if a cell is focused.

Do you have an idea about how I could handle this? So far, the only way I have found is to unable the keyboard navigation so it is not really a perfect solution...

any help would be appreciated, 
Thank you all!
Arnaud
Top achievements
Rank 1
 answered on 20 Sep 2013
1 answer
270 views
Hi to all,

I need to clone an existing chart in another part of the dom in the same page, I was doing it by copying  the options using the following:

var _options  =  jQuery.extend(true, {}, myExistingChart.options);

$("#myNewChart").kendoChart(_options);

This worked pretty fine with the 2013 . 1514 version of kendo ui, but when I updated to the last version it just doesnt work longer.

Anyway, my case is the following, I have a chart, I need to create a new chart on the same page using the same information that is actually showing
the existing chart. What would be the best way to do this??


Thanks a lot.

Pablo.
Alexander Popov
Telerik team
 answered on 20 Sep 2013
3 answers
83 views
Hi,
i just tested on local this example:
https://github.com/kendo-labs/kendo-plugins/tree/master/Mobile/IndexedListView

it works like charm. But i tried on icenium and it is not working:"Uncaught TypeError: Object [object Object] has no method '_scroller' "

here is an example of this for Icenium.

https://github.com/andrescolodrero/iceniumIndexedLIstView

some idea?
Andres
Top achievements
Rank 1
 answered on 20 Sep 2013
2 answers
70 views
I have a kendoWindow that loads a page with some Telerik controls.
RadFormDecorator is used on the loaded pages and main page where KendoWindow is defined.
But when content is loaded (via .refresh(url) method) - all the styling applied by RadFormDecorator disappear almost right away and get overwritten to default browser style.
Such behavior does not exist if KendoWindow is not used. It's almost like it resets styles as it loads content.
Is there any way to address this?
Thanks
dccxz
Top achievements
Rank 1
 answered on 20 Sep 2013
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
Iron
Iron
Missing User
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
Iron
Iron
Missing User
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?