Telerik Forums
Kendo UI for jQuery Forum
15 answers
1.4K+ views
Hi,

I have an issue that I use a dropdown list for my foreignkey field like demo : http://demos.kendoui.com/web/grid/foreignkeycolumn.html

The difference is that the foreignkey field in my model which can be null some time if it is not related to anyone else. Then the issue for me is when I try to editRow with this foreignkey field's original value is null,  and I want to change to another value, this field will always get the value '[object object]'. I don't know why.

See the floor field in the following code:

<script>
    $(document).ready(function() {
        var template = kendo.template($("#detail_template").html());

        function show_menu_details(menuObj) {
            var tg = $("#details");
            tg.fadeOut(function(){
                tg.html(template(menuObj));
                tw = tg.find(".k-window");
                
                
                tw.css({width:tg.innerWidth()-30, height:tg.innerHeight()-55, "margin-top": 20, "margin-left":15});
            });
            tg.fadeIn();
        }
        
        $("#horizontal").kendoSplitter({
            panes: [{collapsible: true, size: "180px"},
                    { collapsible: true} ],
            height: 690
        });
        
        function onChange(e){
            e.preventDefault();
            selectedObj = this.dataSource.getByUid(this.select().data('uid'))
            //console.log(selectedObj);//(this.dataSource.data());
            show_menu_details(selectedObj);
        }
        
        var statuses = [
            {value:'', text:'--'},
            {value:'Available', text:'Available'},
            {value:'Locked', text:'Locked'},
            {value:'Reserved', text:'Reserved'},
            {value:'Occupied', text:'Occupied'}];
        var floors = new Array();
        floors[0]={text:'--',value:''};
        _DS_Floor.fetch(function(data){
            $.each(data.items,function(index,obj){
                floors[index+1] = {text: obj.name, value: obj.id};
            });
            
            var grid = $("#list").kendoGrid({
                dataSource: _DS_Room,
                selectable: "row",
                filterable: true,
                columnMenu: true,
                pageable: {refresh:true},
                editable: {mode:"popup",confirmation:"Sure to delete?"},
                height: 688,
                scrollable: {
                    virtual: true
                },
                sortable: true,
                toolbar: kendo.template($("#toolbar_template").html()), 
                columns: [//{field:'id',title:' ',width:40,template: '<input type="checkbox" id="#= id #" />'},
                          {field:'name',title:'Name'},
                          {field:'floor',title:'Floor',values:floors},
                          {field:'position',title:'Position'},
                          {field:'status',title:'Status',width:80,values:statuses}],//_Columns_Menu,//{ command: ['edit','destroy'], title: "", width: "200px" }
                //change: onChange
            });
            
            grid.find("#btn-add").click(function(e){
                e.preventDefault();
                grid.data("kendoGrid").addRow();
            });
            
            grid.find("#btn-save").click(function(e){
                e.preventDefault();
                grid.data("kendoGrid").saveChanges();//editRow(grid.data("kendoGrid").select());
            });
            
            grid.find("#btn-remove").click(function(e){
                e.preventDefault();
                grid.data("kendoGrid").removeRow(grid.data("kendoGrid").select());
            });
            
            grid.find("#btn-cancel").click(function(e){
                e.preventDefault();
                grid.data("kendoGrid").cancelChanges();//removeRow(grid.data("kendoGrid").select());
            });
            
        });
        
    });
</script>

Thanks.
--
Vladimir Iliev
Telerik team
 answered on 30 Aug 2013
5 answers
149 views
We are using the ASP.NET MVC wrappers for KendoUI Mobile.

Is it possible to have a non-fixed footer for my Views? I tried setting the .Footer() of our MobileLayout, but of course, that fixes the footer to the bottom of the screen.

But what we want is just a simple blurb at the bottom of each View, but it shouldn't be fixed, since the info shouldn't be visible at all times.

I also tried hooking into the "BeforeShow" event of each View to an appendBodyFooter(e) function, which would add a simple <div> element to the $(e.view.element), but for whatever reason, this new div also got stuck to the bottom of the screen! I couldn't find any CSS that was causing the new div to stick, so I'm guessing Kendo must have done it via JS somehow.

Is there any way to have a simple footer at the bottom of each View that is not fixed on the screen?
Kiril Nikolov
Telerik team
 answered on 30 Aug 2013
1 answer
98 views
This is a fairly minor issue, but it's something a client noticed, so I wanted to mention it here. In Chrome for Desktop if I zoom the browser out (CTRL+ -) and then go to insert a table in the editor control, the view is jumbled (see attachment).
Dimo
Telerik team
 answered on 30 Aug 2013
3 answers
3.5K+ views
How do I tell a grid (k-grid) not to use a 100% width? 
Dimo
Telerik team
 answered on 30 Aug 2013
1 answer
165 views
Hello,

I have a Kendo().Window() in my _Layout where i use the .LoadContentFrom("Method","Controller") But if the window can't get to the method due to not logged in, i get a infinite loop of script load at the login page since the KendoUiwindow is trying to access the method. Is there a way to set the timeout on the LoadContentFrom() or something?

Petur Subev
Telerik team
 answered on 30 Aug 2013
1 answer
119 views
Is it possible to update a listview by just using HTML, instead of the dataSource (which I think is a very inefficient method)? For instance, if I had a ul called "output," could I just update that from HTML fetched via AJAX via jQuery.html()?

This kind of worked before, but sometimes the listview wasn't refreshing.  Please add something like jQuery mobile's listview.refresh().

Also, when I switched to the flat listview as opposed to native, it updated, but I got this Javascript error:

Uncaught SyntaxError: Unexpected string
(anonymous function) st.extend.globalEval st.fn.extend.domManip st.fn.extend.append S.extend._createRemoteView
(anonymous function) f p.fireWith r r





Alexander Valchev
Telerik team
 answered on 30 Aug 2013
1 answer
151 views

Here is my code:
@(Html.Kendo().Grid(Model.Available).Name("s").DataSource(d => d.Ajax()).Filterable())
or
@(Html.Kendo().Grid().Name("s").DataSource(d => d.Ajax()[read data ...]).Filterable())

The grid displays information fine but it does not filter when I use the funnel filter icon or when I add my own custom filter. 
I am sure this is straight forward but I can't find the answer. 
jwize
Top achievements
Rank 1
 answered on 30 Aug 2013
4 answers
67 views
Hello KendoUI Team,

I'm about to start work a project for deployment to the Tizen platform (tablet and smartphone). I did a search for "Tizen" in the forums but found no references to it.

Has the KendoUI Team looked into Tizen and/or tested KendoUI Complete for it? Any "gotchas" to watch out for vis-a-vis the use of KendoUI Complete for Tizen?

Will appreciate any definitive response on this.

~Oscar
Kamen Bundev
Telerik team
 answered on 30 Aug 2013
6 answers
157 views
I tried to call the update and delete methods and always enters the created.
it can be?
<script>
    $(function () {
        $("#scheduler").kendoScheduler({
            date: new Date("2013/1/1"),
            startTime: new Date("2013/1/1 07:00 AM"),
            height: 600,
            views: [
            "day",
                { type: "month", selected: true },
                "month",
                "agenda"
            ],
            timezone: "Etc/UTC",
            //editable: { template: kendo.template($("#schedulerTemplate").html()) },
 
            dataSource: {
                batch: true,
                transport: {
                    read: {
                        url: "/Home/CalendarioCargar",
                        dataType: "jsonp"
                    },
                    update: {
                        url: "/Home/CalendarioUpdate",
                        dataType: "json"
                    },
                    create: {
                        url: "/Home/CalendarioAdd",
                        dataType: "json"
                    },
                    destroy: {
                        url: "/Home/CalendarioRemove",
                        dataType: "jsonp",
                         
                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                
                schema: {
                    model: {
                        id: "TaskID",
                        fields: {
                            taskId: { from: "TaskID", type: "number" },
                            title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                            start: { type: "date", from: "FechaIni" },
                            end: { type: "date", from: "End" },
                            startTimezone: { from: "StartTimezone" },
                            endTimezone: { from: "EndTimezone" },
                            description: { from: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            ownerId: { from: "OwnerID", defaultValue: 1 },
                            isAllDay: { type: "boolean", from: "IsAllDay" }
                        }
                    }
                },
                filter: {
                    logic: "or",
                    filters: [
                        { field: "ownerId", operator: "eq", value: 1 },
                        { field: "ownerId", operator: "eq", value: 2 }
                    ]
                }
            },
            resources: [
                {
                    field: "ownerId",
                    title: "Owner",
                    dataSource: [
                        { text: "Alex", value: 1, color: "#f8a398" },
                        { text: "Bob", value: 2, color: "#51a0ed" },
                        { text: "Charlie", value: 3, color: "#56ca85" }
                    ]
                }
            ]
        });
 
        $("#people :checkbox").change(function (e) {
            var checked = $.map($("#people :checked"), function (checkbox) {
                return parseInt($(checkbox).val());
            });
 
            var filter = {
                logic: "or",
                filters: $.map(checked, function (value) {
                    return {
                        operator: "eq",
                        field: "ownerId",
                        value: value
                    };
                })
            };
 
            var scheduler = $("#scheduler").data("kendoScheduler");
 
            scheduler.dataSource.filter(filter);
        });
    });
</script>
Rosen
Telerik team
 answered on 30 Aug 2013
1 answer
99 views
hi,

i have a listview with tab strip. its will appear after login. i am adding some records after adding i want to refresh the listview. for this i am rebinding the listview. here i got the issue after rebind listview items click event not working. anyone can help me in this issue i posted this one month before also still now i am struggling in this issue due to this issue i am unable to go further.

with regards
sumalatha
Suma
Top achievements
Rank 1
 answered on 30 Aug 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
Bronze
Iron
Sergii
Top achievements
Rank 1
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
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?