Telerik Forums
Kendo UI for jQuery Forum
4 answers
277 views
Hello Dimo,
thanks for your reply, which allowed me a leap forward.
Now I understand that to get events from the kendo window in the code-behind I must append the window to the form and
why initially the window is outside.
I added appendTo("form#myform") as configuration option in the creation of the window.The window has a button.
Now I have only one window and I get the button click event in the code-behind.
I have a further question though:
1.
Still I think I'm confusing jquery appendTo and kendowindow appendTo.
The kendowindow appendTo(form) is a configuration option when I create the window. If I create the window without this option,
in the javascript button handler I will call always the jquery appendTo(form) which will always duplicate the window correct ?
So My only option then is to appendTo(form) when I create the window, correct ?

2.
Now the close doesn't give any error but I have the following situation:
Javascript handler
        <script language="javascript" type="text/javascript">
            $(document).ready(function () {
                $("#dialogLogout").kendoWindow({
                    draggable: true,
                    height: "300px",
                    modal: true,
                    resizable: false,
                    width: "600px",
                    actions: ["Minimize", "Maximize", "Close"],
                    appendTo: "form#form1"
                });
                var wnd = $("#dialogLogout").data("kendoWindow");
                $("#btnLogoutConfirmOK").bind("click", function () {
      //                    window.parent.$("#dialogLogout").data("kendoWindow").close();
                    //                    $("#dialogLogout").closest(".k-window-content").data("kendoWindow").close();
                    $("#dialogLogout").data("kendoWindow").close();
                });
            });
        </script> 
The code behind is something like this (I added a sleep of 5 seconds to simulate a long operation).
        protected void btnLogoutConfirmOK_Click(object sender, EventArgs e)
        {
             System.Threading.Thread.Sleep((int)System.TimeSpan.FromSeconds(5).TotalMilliseconds);
        }
The behavior seems
I click the button, the javascript handler is called,
The window closes, either of the 3 close statements give the same effect,
the server-side handler is called, waits for 5 seconds, it returns and forces the reopen of the window.
How can I close the window programmatically ?

Thank you for your kind attention,
best regards
Marco  
marco
Top achievements
Rank 1
 answered on 23 Sep 2013
2 answers
225 views
Hi guys, as per title, I have setup a simple demo menu from the examples and added a select event. This works in Firefox 24, Chrome 29 (29.0.1547.76), but the event does not fire in IE 11.0.9600 UNLESS you select Compatibility Mode, then all is fine.

Code:

<head>
    <title></title>
        <link rel="stylesheet" type="text/css" href="Content/Css/default.css" />
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <!-- Common Kendo UI Web CSS -->
        <link href="Content/Css/kendo.common.min.css" rel="stylesheet" />
        <!-- Default Kendo UI Web theme CSS -->
        <link href="Content/Css/kendo.default.min.css" rel="stylesheet" />
        <!-- Kendo UI Web combined JavaScript -->
        <script type="text/javascript" src="js/debug/kendo.web.js"></script>    
    <script type="text/javascript">
        $(document).ready(function () {
            $("#menu").kendoMenu({
                select: function (e) {
                    // handle event
                    alert('clicked');
                }
            });
        });
    </script>
</head>
<body>
<ul id="menu">
    <li>Normal Item
        <ul>
            <li><span class="k-sprite icon-class"></span>Item with a Sprite</li>
            <li><img src="Icons/contacts.gif" />Item with an Icon</li>
        </ul>
    </li>
    <li><a href="http://www.google.com">Navigation Item</a></li>
    <li class="k-state-active">Active Item</li>
    <li>Template Item
        <div class="k-group k-content">
            Test button - <a class="k-button">Button</a>
        </div>
    </li>
</ul>
</body>

Any ideas please?


Simon

Simon
Top achievements
Rank 1
 answered on 23 Sep 2013
2 answers
450 views
is there a way to sort a ListView or the DataSource?

don't want to use group because i don't need the title of it.
i'm getting the data from sqlite and i don't have sorting information in DB, i need to generate it first.
domiSchenk
Top achievements
Rank 1
 answered on 23 Sep 2013
3 answers
312 views
Is there something I can do to force a keyboard to disappear when a drawer is opened?  I haven't tested on iOS yet, but on android with my app I have an issue if an input has focus and the keyboard is shown swiping to open the drawer will leave the keyboard open.  It was my understanding that this is a function of the input still having focus.  I  have tried a few different techniques to dismiss the keyboard, '$( document.activeElement ).blur();' didn't work and neither did '$( "input:focus" ).blur();'  I read a post on stack overflow where someone tried setting focus on a checkbox to cause the keyboard to be removed, but that didn't help either.

Anybody know of a way to handle this?
 -David
Petyo
Telerik team
 answered on 23 Sep 2013
1 answer
144 views
When will the theme builder be updated?

There's no scheduler in there at all, and I find I can change my colors, but then it's missing some on the merge.  So if I style out all the blue on "flat" and combine it all with the template there's still blue elements.

Can you also enhance it such that it'll annotate the elements on the page that the style will change?...like if I hover on the theme element\color border appear overlayed on the page elements?

Steve
Alex Gyoshev
Telerik team
 answered on 23 Sep 2013
3 answers
253 views
I want to retrieve bar code in byte array form, is this possible?
If not what other options could be?

Please reply ASAP.

Thanks,
Mahesh A
Petur Subev
Telerik team
 answered on 23 Sep 2013
1 answer
128 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.4K+ 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
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
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
Licensing
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?