Telerik Forums
Kendo UI for jQuery Forum
1 answer
103 views
I encountered an error when attempting to configure an AutoComplete data source on an Intranet web site.  The site uses Windows Authentication (ASP.Net MVC3).  The AutoComplete only loaded data 1/10 of the time (roughly).  Otherwise it would flicker a little, but no data would appear.  Works fine in Chrome.

There is only one workaround that I found that made it work 100% of the time: Force IE-7 compatibility mode in the HTML. That workaround is not preferable.

Any ideas?

UPDATE: Removed references to a second workaround, which on further testing did not end up working.

Here's my HTML:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <title>New Project</title>
        <script type="text/javascript" src="/Scripts/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/Scripts/kendo.all.min.js"></script>
        <link type="text/css" href="/Content/kendo.common.min.css" rel="stylesheet"/>
        <link type="text/css" href="/Content/kendo.custom.min.css" rel="stylesheet"/>
    </head>
    <body>
        <input id="ContactDescription" name="ContactDescription" type="text" value="" />
        
        <script type="text/javascript">
            $(document).ready(function () {
                var contactAutoCompleteDataSource = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: "/Ajax/EmployeesList",
                            dataType: "json",
                            data: {
                                showAll: function () {
                                    return $('#showAll').is(':checked');
                                }
                            }
                        }
                    },
                    change: function (e) {
                        //alert('Total records: ' + contactAutoCompleteDataSource.total()); // This displays ~500
                    }
                });
                $('#ContactDescription').kendoAutoComplete({
                    minLength: 2,
                    filter: "contains",
                    dataTextField: "title",
                    dataSource: contactAutoCompleteDataSource
                });
                $('#showAll').click(function (e) {
                    contactAutoCompleteDataSource.read();
                });
            });
        </script>
    </body>
</html>
Atanas Korchev
Telerik team
 answered on 27 Jan 2012
1 answer
149 views
Hi,

What is the easiest way to provide a view of a specific day to show scheduled events.  I am not looking for a scheduler.  No need to add events, drag-and-drop or anything related to a scheduler.

I have events in a database that I need to represent in an easy to understand format to the user.

Thanks!
Atanas Korchev
Telerik team
 answered on 27 Jan 2012
1 answer
509 views
When I configure my grid with navigatable: false and editable: true, then edit a cell, when I press the enter key I expect it to stop editing, but it does nothing (the cell remains in edit mode).  When I have navigatable set to true, pressing the enter key when editing a cell stops editing.   Is this a bug?

This is happens with "string" field types.

Awesome product by the way!
Nikolay Rusev
Telerik team
 answered on 27 Jan 2012
1 answer
204 views
The _wrapper method in the  NumericTextbox looks like it has a bug where there is unreachable code, if the NumericTextbox  
has been loaded previously.

Looking at the source and comparing it to the DatePicker source, which I know works, I can see the problem.

The source for DatePicker has this definition:
_wrapper: function() {
            var that = this,
                element = that.element,
                wrapper;
 
            wrapper = element.parents(".k-datepicker");
 
            if (!wrapper[0]) {
                wrapper = element.wrap(SPAN).parent().addClass("k-picker-wrap k-state-default");
                wrapper = wrapper.wrap(SPAN).parent();
            }
 
            wrapper[0].style.cssText = element[0].style.cssText;
            element.css({
                width: "100%",
                height: "auto"
            });
 
            that.wrapper = wrapper.addClass("k-widget k-datepicker k-header");
            that._inputWrapper = $(wrapper[0].firstChild);
        }

The source for NumericTextbox has this definition:
_wrapper: function() {
            var that = this,
                element = that.element,
                wrapper;
 
            wrapper = element.parent();
 
            if (!wrapper.is("span.k-widget")) {
                wrapper = element.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent();
                wrapper = wrapper.wrap("<span/>").parent();
            }
 
            wrapper[0].style.cssText = element[0].style.cssText;
            that.wrapper = wrapper.addClass("k-widget k-numerictextbox").show();
            that._inputWrapper = $(wrapper[0].firstChild);
        }

You may note that it only looks at the direct parent for the wrapper, when in fact the wrapper is on it's second parent, as indicated by last half of the code.

Also this bug may be replicated on http://demos.kendoui.com/web/numerictextbox/index.html by simply rerunning the command through a browser console
$("#numeric").kendoNumericTextBox();

If the code is supposed to be rerun-able then it should look similar to the following:
wrapper = element.parents('.k-numerictextbox');
  
if (!wrapper.is(".k-numerictextbox")) {
    wrapper = element.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent();
    wrapper = wrapper.wrap("<span/>").parent();
}


Now I don't know if the Kendo UI elements are all supposed to be rerun-able or not, I will post a separate thread about that as that is a more generic conversation.
Georgi Krustev
Telerik team
 answered on 27 Jan 2012
0 answers
179 views
Have a simple example that can give me.
Thanks
Jack
Top achievements
Rank 1
 asked on 27 Jan 2012
4 answers
2.9K+ views
Hi guys,

I was looking for a way to update the dataSource of the DropDownList dynamically, without recreating the control again. Take this code from your DropDownList example:

<input id="dropdownlist" />
 
<script type="text/javascript">
$(document).ready(function() {
    $("#dropdownlist").kendoDropDownList([{text: "Item1", value: "1"}, {text: "Item2", value: "2"}]);
});
</script>

Do i need to recreate the dropdownlist input, or is there an easy way to replace the dataSource of the control and have it rebind?

Also, is there more documentation or complex examples coming before November, or will this be released in November along with the new controls?

Thanks,
Tony
Nick
Top achievements
Rank 1
 answered on 26 Jan 2012
0 answers
153 views
Hi,

I need the ability to have the following:

1) Set the selected date of the datepicker in a grid.
2) Format the date picker and the date in the grid column.

Here is my code for you:

$(document).ready(function () {
 
       //kendo.toString(new Date(), "MM/dd/yyyy")
 
           
            
           dataSource = new kendo.data.DataSource({
               serverPaging: true,
               serverSorting: true,
               batch: true,
               pageSize: 100,
               transport: { read: { url: "@Url.Action("Read", "Animals")", type: "POST" },
                           update: { url: "@Url.Action("Update", "Animals")", type: "POST" },
               parameterMap: function (data, operation) {
                   alert(operation);
                    if (operation != "read") {
                       // post the Animals so the ASP.NET DefaultModelBinder will understand them:
 
                       var result = {};
 
                        //alert(data.models.length);
                        //alert(data.models);
                         
                       for (var i = 0; i < data.models.length; i++) {
                           var animal = data.models[i];
 
                           for (var member in animal) {
                               result["animals[" + i + "]." + member] = animal[member];
                           }
                       }
 
                       return result;
                   }
               }},
               schema: { model: { id: "AnimalId", fields: { AnimalId: { editable: false, nullable: false }, Name: {editable: true, nullable: false, validation: { required: true }}, Description: {editable: true, nullable: false, validation: { required: false }},
               FatherName: {editable: false}, MotherName: {editable: false}, BeginDate: {type: "date", editable:true, nullable:true, validation: { required: true }}, EndDate: {type: "date", editable:true, nullable:true, validation: { required: true }} }}},
               success: function (data) { debugger; alert(data.d.Text); },
               error: function (xmlHttpRequest) { debugger; alert("Sorry, we encountered the error: " + xmlHttpRequest.responseXML.text + " Please try again."); }
           });
 
           $("#grid").kendoGrid({
               dataSource: dataSource,
               scrollable:
                            { virtual: true },
               toolbar: ["create", "save", "cancel"],
               sortable: true,
 
               columns: [{ field: "Name" }, { field: "Description"}, { field: "BeginDate", title: "Date of Birth"}, { field: "EndDate", title: "Date of Death"},  { field: "FatherName", title: "Father"}, { field: "MotherName", title: "Mother"}],
               editable: true
           });
       })

Thanks for your help!
Rich
Top achievements
Rank 1
 asked on 26 Jan 2012
1 answer
157 views
Will there be a VS-Support with Intellisense and stuff like that for the complete Kendo UI?
Greetings-


Tom
Sebastian
Telerik team
 answered on 26 Jan 2012
0 answers
165 views
I am using an ajax call to get my initial nodes by doing this:
$(result.d).each(function () {
    $("#treeData").append("<li data-id='" + this.GroupId + "'>" + this.Name + "</li>");
});
 
treeview = $("#treeData").kendoTreeView({
     select: onKendoNodeSelect
});

This sets the nodes up ok but when a node is selected I tested with these two lines:
alert($(e.node).data("id"));
alert($(e.node).text());

The first is null but the second displays the correct text for the selected node, why is the first one null?

Also I tried to append to the node like so:
var selectedNode = treeview.select();
treeview.append({ text: "new node" }, selectedNode);

And it didn't display until I clicked on something else? I'm also not sure how to apply data attributes when appending?
Richard
Top achievements
Rank 1
 asked on 26 Jan 2012
3 answers
264 views
Does the Treeview Node have an ID field -  if not it would be nice to use for a DB Primary Key (I have looked maybe missed it!)

but I think the whole set of controls are very clean and sleek - great work
Richard
Top achievements
Rank 1
 answered on 26 Jan 2012
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
+? 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?