Telerik Forums
Kendo UI for jQuery Forum
0 answers
137 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
149 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
156 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
247 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
214 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
110 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
650 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
184 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
97 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
1 answer
130 views
Guys,

I have setup a demo using Kendo datasource. See attached for the html and JSON responses.

I have two questions:

1. When firing the GetCustomersData() method the items do not appear in the list after being appended unless I hit the backspace button - why is this?

2. I have lifted parts of your custom template binding example to try to get this working but cannot seem to, please let me knmow what is not quite right.

I have attached the HTML and the .json response from the WCF Data Service.

Note: the repsonse is normally sent to Kendo UI as JsonP as the "oData" type on the transport requires this.

Luke
Petyo
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?