Telerik Forums
Kendo UI for jQuery Forum
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
119 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
136 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
145 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
238 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
6 answers
201 views
I have 5 DropDownLists and they all work great in IE9, but in IE8 one of them does not drop down.  I tried adding the following to its open event as I saw suggested for a similar issue for another control, suspecting it might be a z-index issue, but it didn't help.  This dropdownlist is configured identically to some of the others, except that it queries a different web service to populate it.  Unfortunatly, the users that will be using this are all using IE8.  All of the dropdowns are inside a tabstrip.
$(".k-list-container").parent().css("zIndex", "11000");
Cyndie
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
99 views
Hi All,

I cannot figure out how to do "OR" filtering.  It seems that the filtering is currently done using "AND" logic:

For Example:
var filter = [{ field: "name", operator: "contains", value: "mark"},
          { field: "title", operator: "contains", value: "mr."}];

This filter will find all records with a name containing "mark" AND a title containing "mr.".  Is there a way to filter the records with a name containing "mark" OR a title containing "mr."?

Thanks in advance for any help!
Andrew
Top achievements
Rank 1
 answered on 26 Jan 2012
6 answers
636 views
My data service works with a large database. Getting data from it works OK but trying to get row count results in a timeout.

Is there any way I can stop Kendo sending $inlinecount=allpages in the request to my service? I tried overriding dataSource.transport.parameterMap, dataSource.transport.read.data and dataSource.schema.total but it causes Kendo to crash.

Error: data is undefined
Source File: kendo.all.js
Line: 4864
Max
Top achievements
Rank 1
 answered on 26 Jan 2012
3 answers
174 views
Hi

One of the reason I purchased the KendoUI was mobile api but it is lacking a lot of stuff especially in iPad side.  When will you guys publish new and improved build?  Geo and layering over the map will be nice as well.

thanks guys

Wil
Petur Subev
Telerik team
 answered on 26 Jan 2012
1 answer
87 views
When a grid is created on a second tab of a TabStrip.
the header.outerHeight() returns 1px for the line "height -= header.outerHeight();" in function "_scrollable"

see http://jsfiddle.net/ttaylor/9uW3g/ for example

On the "Payment History" tab of the DetailTemplate shows the bug.



Dimo
Telerik team
 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
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
Dialog
Chat
DateRangePicker
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?