Telerik Forums
Kendo UI for jQuery Forum
1 answer
209 views
Hi 
I have problem with using kendo combobox on grid template editor.

Combobox definition:
                       @(Html.Kendo().ComboBoxFor(m => m.DepartmentCode)  
        .DataTextField("Code")
                .DataValueField("Code")
    .Filter(FilterType.Contains)
    .DataSource(action => action.Read(read => read.Action("GetDepartmentsForComboBox", "StockLocation")).ServerFiltering(true))
    .MinLength(1)

When I open editor ( by Create button on grid ) filtering works fine.
I pickup one value. Close editor. 
Then I open editor second time and it is showing me only last selected value on the combobox list.
I found out that there is a request to server but filter is set up to last selected value instead of entered new text 

Is it a bug ? Do I need to clear somehow a last selected value on editor combobox ?
Tomasz
Top achievements
Rank 1
 answered on 18 Jan 2013
9 answers
188 views
Adding a marker listner for MouseDown allows me to show info windows (Click doesn't work reliably), however I can't get the close icon button to work in the info window... I guess this is to do with the KendoUI but I'm not sure how to get around it?
Jordan
Telerik team
 answered on 18 Jan 2013
4 answers
292 views
From what I can tell via the source there isn't a way to do this. append() calls dataSource.add() which also appears to only accept one model at a time. I'm trying to avoid multiple repaints. The only viable solution I see is to use a combination of treeView.setDataSource and treeView.select to re-render the entire tree once. This is opposed to calling .append() n number of times.

Am I missing another solution?
Alex Gyoshev
Telerik team
 answered on 18 Jan 2013
2 answers
214 views
Hello,

why my kendo can not upload image and video.the source like this:

$(function () {
                function openVideoUploader(requestId, callback) {
                    var origHtml = $("#uploadWin").html();
                    var updateResult = false;

                    $("#footage").kendoUpload({
                        multiple:false,
                        async:{
                            saveUrl:"/api/" + kupBucket + "/uploadvideofootage",
                            autoUpload:false
                        },
                        error:function (e) {
                            //popupAlert(e.XMLHttpRequest.response);
                            alert(e.XMLHttpRequest.responseText);
                        },
                        success:function (e) {
//                            $("#uploadForm").find(".k-progress").css("visibility", "hidden");
                            $("#uploadForm").find(".k-filename").css("height", "20px");
                        },
                        upload:function (e) {
                            e.data = { requestId: requestId };
                        },
                    });

                    var kendoWindow = $("#uploadWin").kendoWindow({
                    actions: ["Close"],
                    form: true,
                    modal:true,
                    visible: false,
                   resizable: false,
                        width:350,
                    }).data("kendoWindow").center().open();
                    
                    
                    $("#uploadWin").parent().find(".k-window-action").css("visibility", "hidden");

                    function onClosed() {
                        callback(updateResult);
                        $("#uploadWin").html(origHtml);
                        updateResult = false;
                    }

                    $("#cancelUpWin").click(function (e) {
                        updateResult = false;
                        $("#uploadWin").data("kendoWindow").close();
                    });

                }

                var uploadFootage = function (e) {
                    e.preventDefault();
                    var dataItem = this.dataItem($(e.currentTarget).closest("tr"));

                    openVideoUploader(dataItem.id, function (choice) {
                    });

                }

                var grid = $("#reqGrid").kendoGrid({
                    dataSource:{
                        transport:{
                            read:function (options) {
                                getUploadRequests("", "Open", onSuccessGetUploadRequests, null);
                                function onSuccessGetUploadRequests(responseData) {
                                    if (responseData.result == "ok" && responseData["upload-requests"] != null)
                                        options.success(responseData["upload-requests"]);
                                    else {
                                        throwServerError(responseData.reason);
                                        options.success([]);
                                    }
                                }
                            }
                        },
                        pageSize:15
                    },
                    pageable:{
                        input:true,
                        numeric:false,
                        pageSizes:false
                    },
                    sortable:true,
                    filterable:false,
                    selectable:true,
                    resizable:true,
                    columns:[
                        { field:"submittedOn", title:"&{'submited-on'}" },
                        { field:"device", title:"&{'device-name'}", template:'#= device.name #' },
                        { field:"timeFrom", title:"&{'from'}", template:'#= kendo.toString(kendo.parseDate(timeFrom, "ddMMyyyyHHmmss"), "dd/MM/yyyy hh:mm:ss")#' },
                        { field:"timeTo", title:"&{'to'}", template:'#= kendo.toString(kendo.parseDate(timeTo, "ddMMyyyyHHmmss"), "dd/MM/yyyy hh:mm:ss")#' },
                        { field:"channelId", title:"&{'channel'}" },
                        { field:"status", title:"&{'status'}" },
                        { command:[
                            { text:"&{'upload-video'}", click:uploadFootage}
                        ], title:"", width:"200px"  }
                    ]
                }).data("kendoGrid");
            }
    );
Daniel
Telerik team
 answered on 17 Jan 2013
6 answers
1.3K+ views
I am trying to link a JQuery AJAX command to a MVC controller and having problems getting the files to the controller from the AJAX command.  What am I doing wrong?

HTML
<form id="createTireGroupFromExcelForm" class="form-horizontal">
            ...boilerplate...
                        <input name="files[]" id="files" type="file" data-role="upload" multiple="multiple" autocomplete="off">
           ...boilerplate... 
</form>

Javascript
$("#submitTireGroupExcel_btn").click(function () {
            $.validator.unobtrusive.parse($('#createTireGroupFromExcelForm'));
            if ($('#createTireGroupFromExcelForm').valid()) {
                var form = $('#createTireGroupFromExcelForm');
                $.ajax({
                    type: 'post',
                    enctype:"multipart/form-data",
                    url: "@Url.Action("CreateTireGroupFromExcel", "Events")",
                    data: form.serialize(),
                    success: function (result) {
                        if (!result.success) {
                            alert(result.error);
                        } else {
                            $('#createTireGroup').modal('hide');
                            $.pjax({
                                url: "@Url.Action("TireBuilder", "Events")" + "?tireSetGroupID=" + result.tireSetGroupID,
                                container: '#update_panel'
                            });
                        }
                    }
                });
            }
        });

MVC Controller
public ActionResult CreateTireGroupFromExcel(Guid eventID, Guid teamID, string name, IEnumerable<HttpPostedFileBase> files)
{
     throw new NotImplementedException();
}
Chirdeep
Top achievements
Rank 2
 answered on 17 Jan 2013
2 answers
323 views
The editor for the RoleIds property shows the correct selections when the row enters the "edit" mode.  However, if I change the selected value in this control and press the update button, no call to my update url is made, as if nothing changed.

What am I missing?

Here's the code (see attached image for behavior):

<div id="myGrid"></div>
<script type="text/javascript">
    $(function () {
        var dataSource = new kendo.data.DataSource({
            transport: {
                read: { url: "/Test/TestRead"},
                update: {
                    url: "/Test/TestUpdate",
                    type: "POST"
                }
            },
            schema: {
                model: {
                    id: "Id"
                }
            }
        });

        $('#myGrid').kendoGrid({
            columns:
                [
                    {command:
                        [{
                                name:"edit",
                                buttonType:"ImageAndText",
                                text:"Edit"
                        }]
                    },
                    {   
                        field: "Name"
                    },
                    {
                        title:"Roles",
                        template:"#: RoleCSV #",
                        field: "RoleIds",
                        editor: "<select id='RoleIds' name='RoleIds' data-val='true' data-bind='value: RoleIds' multiple style='width:100%'><option value='1'>Admin</option><option value='2'>Guest</option></select>"
                    }
                ],

            dataSource: dataSource,
            model:{
                
            },
            editable: { mode: "inline", update: true}
        });
    });

</script>

Returned data from the read url looks like this:

[{"Id":1,"Name":"Mathieu","RoleCSV":"Admin","RoleIds":[1]},{"Id":2,"Name":"Martin","RoleCSV":"Admin, Guest","RoleIds":[1,2]},{"Id":3,"Name":"Patrick","RoleCSV":"Guest","RoleIds":[2]}]
Brett
Top achievements
Rank 2
 answered on 17 Jan 2013
3 answers
319 views
I have a inline editable grid but when I want to edit a column with a combobox custom editor... just cant edit the cell by writing the value manually  :(  then i have to click over the combo arrow button to open the combo and then write the value i wish

Thanks
Iliana Dyankova
Telerik team
 answered on 17 Jan 2013
1 answer
226 views
If I use <input type=datetime-local> it shows up as a blank box, because the css styles set the color of the text, but none of the other styles apply to input[type=datetime-local].
Kamen Bundev
Telerik team
 answered on 17 Jan 2013
3 answers
113 views
Edit:

I would delete this post and start a new one if the forum let me. The actual source of my problem is this piece of sample code for your site.

<ul data-role="listview" id="foo" data-click="listViewClick">
    <li><a data-role="button" data-name="bar">Bar button</a> | <a data-role="button" data-name="baz">Baz button</a></li>
</ul>

<script>
 function listViewClick(e) {
     console.log(e.button); // Kendo mobile Button instance
 }
</script>


It seems to indicate that there is some magical way to know that the button was clicked and which button was. It does not seem to work in practice as running this example e.button is always null for me, so I cant figure out how to distinguish between a row click and a click on the button.

Mike
Dimo
Telerik team
 answered on 17 Jan 2013
7 answers
846 views
I need to know which classes apply to the panelbar. The Theme builder is not clear about what CSS effect what controls

I have a menu that looks fine when I select a menu item Appointment Scheduling Summary



But when I select Cancelled the page refreshes and the menu does this:



What CSS property sets the menu background to transparent or white? I cannot find it and the Theme Builder is confusing at best.

Where is the documentation for each control in the Kendo UI Suite for the web so I can quickly find what classes effect what controls?
Dimo
Telerik team
 answered on 17 Jan 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
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?