Telerik Forums
Kendo UI for jQuery Forum
6 answers
1.5K+ views

I have a newly created Telerik project to which I've only added Entity Framework and WebAPI. I've used the KendoUI scaffolder to create a simple Grid from a very simple model (and hopefully corrected the errors in the scaffolder in the latest version). Read (GET) and Create (POST) work fine, but Update and Delete doesn't work. When trying to do Update or Delete, I get:

kendo.all.min.js:9 "Uncaught TypeError: e.replace is not a function"

 

Any idea of what is wrong? I am quite sure it is something quite simple. 

 

I've attached code below

 

 <div id="grid"></div>
<script>
    $("#grid").kendoGrid({
        height: 400,
        columns: [
            {field: "Name"},
            {command: [ "edit" , "destroy"], width: 180 }
        ],
        toolbar: ["create"],
        dataSource: {
            type: "webapi", 


            transport: {
                create: {
                    url: "/api/AccommodationTypes/",
                    contentType: "application/json",
                    type: "POST"
                },
                read: {
                    url: "/api/AccommodationTypes/",
                    contentType: "application/json"
                },
                update: {
                    url: function (accommodationType) {
                        return "/api/AccommodationTypes/" + accommodationType.id;
                    },
                    contentType: "application/json",
                    type: "PUT"
                },


                destroy: {
                    url: function (accommodationType) {
                        return "/api/AccommodationTypes/" + accommodationType.id;
                    },
                    contentType: "application/json",
                    type: "DELETE"
                },
                parameterMap: function (data, operation) {
                    return JSON.stringify(data);
                }
            },

            schema: {
                data: "Data",
                total: "Total", 
                errors: "Errors",
                model: {
                    id: "Id",
fields: {
Id: { type: "number"},
Name: { type: "string"}
}
                }
            },
            serverPaging: true,
            serverSorting: true,
            serverFiltering: true,
            serverGrouping: true,
            serverAggregates: true,
        },
        editable: "inline",
        selectable: "single row",
        filterable: { 
mode: "row"
},
        scrollable: true
    })

</script>

improwise
Top achievements
Rank 1
Iron
Iron
 answered on 02 Dec 2015
2 answers
732 views

We have a Dropdownlist in a Window that gets a wrong Z-Index. We haven't been able to duplicate this problem in Dojo so we know it's likely an issue with how we have something setup. However, we're not sure where to start looking.

The Window gets a z-index of 10003 and the dropdownlist gets a z-index of 10002, which positions it behind the window.

We are using angular-kendo if that makes any difference.

Harlan
Top achievements
Rank 1
 answered on 02 Dec 2015
1 answer
560 views

http://www.telerik.com/forums/is-it-possible-to-text-wrap-chart-axis-labels 

Based on the above post, I implemented labels template like following: 

@(Html.Kendo().Chart<AssignmentModel>()
.Name("AssignmentChart")

.Legend(legend => legend

              .Visible(true)
              .Labels(labels => labels .Font("13px open sans").Template("#= wrapText(text)#")))
              .DataSource(ds =>
                {
                    ds.Read(read => read.Url("/GetAssignments"))
                        .Group(group => group.Add(Model => Model.PROGRAM_NAME))
                 })

)

 

function wrapText(value){
        debugger;
        if (value.length > 24){
            value = value.substring(0, 24) + "\n" + value.substring(24);
        };
        return value;
    };

 

But the approach didn't produce the desired effect, when I inspected element in the front end, it looks like this:

<text id="k10384" data-model-id="k10385" x="453" y="196" fill-opacity="1" style="font: 13px open sans; cursor: pointer;" fill="#232323">TestPolicy22222222222222

222222222222</text>

 

However, on the page it displays all the same as when no wrapping is performed, as seen in the attachment. 

 

 I also looked up in some other post: 

http://stackoverflow.com/questions/13247577/line-break-in-category-label-of-kendo-ui-chart

The information told me the text wrapping in lables is already implemented in Kendo, by using line feed characters ("\n").

I wonder if the implemented line break functionality is only for chart labels, or for both datasource labels and chart labels? 

 Thank you very much!

 

Best,

Wenting

 

Iliana Dyankova
Telerik team
 answered on 02 Dec 2015
1 answer
257 views

In the attached TestApp project I have two files index_works.html and index_broken.html. One where the Kendo Validator works fine in the Kendo Window but only if I moved the <form> tag inside of the Kendo Window control.

 What do I need to do to make it work in the broken one, or is this not possible?

 Regards,

m

Viktor Tachev
Telerik team
 answered on 02 Dec 2015
1 answer
163 views

Now "KendoUI upload" returns an empty string to signify success, but I want to return user-defined strings to  signify success? please give example!

 

Yours sincercely,

Pansh

Dimiter Madjarov
Telerik team
 answered on 02 Dec 2015
2 answers
227 views

Hi there,

My form has a combo box that is populated from a viewbag in a controller.  The Combobox isn't posting any data when the form is submitted however.  I don't get any errors but the values in the database are always null.  What have I done wrong?

 The Combobox Code

 

@(Html.Kendo().ComboBox()
      .Name("workscopecode")
      .DataTextField("Text")
      .DataValueField("workscopecode")                      
      .Filter(FilterType.Contains)
      .Placeholder("-- Select Duties --")
      .BindTo(ViewBag.duties))

 My Viewbag in my Controller Code

IEnumerable<SelectListItem> duties = mydata.tbl_workscopes
 
    .Select(c => new SelectListItem
    {
        Value = c.idx_index.ToString(),
        Text = c.code
    });
ViewBag.duties = duties;

CIQIntegration
Top achievements
Rank 1
 answered on 02 Dec 2015
1 answer
180 views

I'm attempting to use the sourcemaps included in the trial version to be able to view the original, unminified version of the scheduler to help track down a bug we're experiencing with the Kendo scheduler in our application. I've altered the sourceRoot directive of kendo.scheduler.min.js.map (because I am hosting the sourcemap + original javascript file in their own folder on a webserver) but unfortunately the sourcemap appears to (at least in Chrome and Chrome Canary) generate an empty file.

Any ideas?

T. Tsonev
Telerik team
 answered on 02 Dec 2015
1 answer
528 views

Hello,

I have a bar chart with day as category but I don't have data for all the days.

Is it possible to show only the bars with values?

http://dojo.telerik.com/OPEba/2

Thanks,

Marco

Eduardo Serra
Telerik team
 answered on 02 Dec 2015
1 answer
110 views

The setDataSource(): void; method in the kendo.all.d.ts definition for the TabStrip is missing the DataSource parameter.

It should be: setDataSource(dataSource: kendo.data.DataSource): void;

Daniel
Telerik team
 answered on 02 Dec 2015
1 answer
111 views
Hello,
I am working on Kendo ASP.Net MVC 2015.1.429, I use a field with datasource is a remote data from URL.
It works well on Desktop environment (image 1). However, when I run this form on mobile, I can’t type any characters into this field (image 2).
@(Html.Kendo().Scheduler< Calendar.Models.CalendarEvents>()
.Name("scheduler")
     â€¦
.Resources(resource =>
{
    resource.Add(m => m.Clients).Title("Client").Multiple(true).DataTextField("Text").DataValueField("Value").DataSource(source => source.Read(read => read.Action("GetPatientsList", "Calendar").Data("searchclient")));
})
…
.Mobile(MobileMode.Auto))

 

Is there any way to fix it to show on mobile correctly?

Many thanks,

Georgi Krustev
Telerik team
 answered on 02 Dec 2015
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?