Telerik Forums
Kendo UI for jQuery Forum
3 answers
329 views

Hello

In PUT and POST operation all number properties of my entity are sent in string format. In my GET operation, I receive my entity with correct value, but when I send my entity, my datasource convert number properties in string.

My datasource definition :

var _FrmTest_dtTtOrigineGeographique = new kendo.data.DataSource({
            type: "odata-v4",
            content: "json",
            transport: {
                read: {
                    url: "https://localhost:9443/odata/EntiteTtOrigineGeographiques",
                },
                update: {                     
                    url: function (data) { return "https://localhost:9443/odata/EntiteTtOrigineGeographiques(" + data.IdTtOrigineGeographique + ")" },
                }
                 
            },
            schema: {
                model: {
                    id: "IdTtOrigineGeographique",
                    fields: {
                        IdTtOrigineGeographique: {
                            type: "number",
                            editable: false,
                        },
                        StrLibelle: {
                            type: "string"
                        },

                        Pourcentage: {

                             type: "number"

                        }

                    }
                }
            },
            error: function (e) {
                console.log(e.xhr);
            },
            filter: {
                logic: "and",
                filters: [
                    { field: "IdTtOrigineGeographique", operator: "eq", value: _idTtOrigineGeographiqueSelect }]
            },
            serverFiltering: true,
            serverSorting: true
        });

With GET operation, I receive my entity like this

{"@odata.context":"https://localhost:9443/odata/$metadata#EntiteTtOrigineGeographiques","@odata.count":1,"value":[{"IdTtOrigineGeographique":5,"StrLibelle":"Autres départements", "Pourcentage": 4.55}]}

But when I update my entity and I call sync method, my datasource send my entity like this :

{"IdTtOrigineGeographique":"5","StrLibelle":"Autres département","Pourcentage":"4.55"}

I verify JSON.stringify() and kendo.stringify() functions and my entity is correctly serialize

For integer property it's not blocking because my webservice convert automatically string to integer. But with float (ex : 4.55), I have a exception and my entity it's not deserialize.

Can you help me ? Thanks in advance

Arnaud

Veselin Tsvetanov
Telerik team
 answered on 05 Jul 2018
3 answers
185 views

Hi

Is there a way I can control the transition style of a view? I would like to let some views slide in from top, bottom, left or right. Is that somehow possible?  I am already doing this but not with views, just DIVs and an own slide function. I would like to do that with views so I don't have to care about rotation things, etc. 

Regards

Misho
Telerik team
 answered on 05 Jul 2018
2 answers
109 views

I have a local data source which is a JS array. I setup transport methods to read/write the data. When the data is modified by Kendo widget like grid it works fine.

If I modify the array directly outside a widget in JS, how can I tell Kendo that the data source changed?

 

Thanks!

Brett
Top achievements
Rank 1
 answered on 05 Jul 2018
1 answer
984 views

I am new to Kendo, I have a dropdownList and on Change I would like to set all of the rows in the dropDownList to "Sold" . Right now I do have the change portion of the DropDownList working but can not seem to change the value of any rows . This is my code and I am trying to follow this  example here anyways this is my code below . I have about 12 rows and my field name is Names . I am also getting an error when I try to complete that below and it says Uncaught TypeError: Cannot read property 'set' of undefined . Any suggestions on getting this resolved would be great . Again all I am trying to do is set all the rows below dropdownList with the field Names to John when someone changes value in the dropdown .

 

 <div id="MyGrid" style="text-align: center;"> </div>
function statusUpdate(element)
 {    
element.element.kendoDropDownList({       
 optionLabel: "-Select-",  dataTextField: "text",  dataValueField: "value",       
 dataSource: [{ text: "Scott", value: "Scott" },{ text: "Sam", value: "Sam" }],        
change: function (e) { 
     
    var grid = $("#MyGrid").data("kendoGrid");
        var dataItem = grid.dataSource.get(2);
        dataItem.set("Names", "John");
 
    }
   })
}
Dimitar
Telerik team
 answered on 05 Jul 2018
3 answers
452 views

I have a grid, which uses detailInit, inside the detail row I have a grid with a toolbar template with an Add and Delete button. When I click the Add button to add a new row to the grid, the new row gets added but the detail row collapses.

How can stop that from happening?

John
Top achievements
Rank 1
 answered on 04 Jul 2018
4 answers
548 views

Hi,

What is the most efficient way to update the map layer datasource? For this map I use a url I'd like updated (because a get parameter changes).

I read this: http://d585tldpucybw.cloudfront.net/forums/change-marker-layer%27s-data-source

But it's outdated, currently there is no more _initDataSource() and the setDataSource() did find its way to the layer object but I can't get it to work:

don't find an example for it.

 also, I tried:

var layer = $("#selectionMap").data("kendoMap").layers[0];
layer.dataSource.transport ={read:$scope.baseUrl+"/MapStatistics"+"?countryvar="+$scope.ui.subSelections.countryVar};
layer.reset();

 Also tried this:

layer.setDataSource({type: "geojson",transport: {read:$scope.baseUrl+"/MapStatistics"+"?countryvar="+$scope.ui.subSelections.countryVar}})

 

Error: this.dataSource.unbind is not a function

So my question: Is there an efficient way to do this so the map is reloaded on layer url update?

thanks,

Arno
       
​

 

Alex Hajigeorgieva
Telerik team
 answered on 04 Jul 2018
8 answers
402 views

GroupFooterTemplate works during load, but after removing the age from header and readding, the grid crashes.

Any suggestions?

 

Example in following link.

https://dojo.telerik.com/EhIkExel/2

Alex Hajigeorgieva
Telerik team
 answered on 03 Jul 2018
1 answer
306 views
Is there a way to add subtitles/closed-captioning to the player?
Georgi
Telerik team
 answered on 03 Jul 2018
1 answer
90 views

If I have a video in only two formats (ogg and webm), can I add both as sources and have the media player automatically detect which one to use?  Or do I need to do the necessary browser checks before adding the source to the player?

Georgi
Telerik team
 answered on 03 Jul 2018
3 answers
965 views

Hello All

I was going through the example below and I would like to know how I could enable filtering on the grid that was initialized from a HTML table.

https://demos.telerik.com/kendo-ui/grid/filter-row

In my case the data source for the grid is not odata. I would like to enable filtering for the below example:

https://demos.telerik.com/kendo-ui/grid/from-table

Any pointers would be appreciated!

Thanks.

Vijhay Devarajan.

 

 

Eyup
Telerik team
 answered on 03 Jul 2018
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?