Telerik Forums
Kendo UI for jQuery Forum
4 answers
308 views
Hi, we have a subclass of TabStrip and would like to set its default animation property to false.  It seemed logical to simply override the options object with that setting -- but this causes an error as soon as you try to change tabs:

http://jsfiddle.net/nwVtr/

The error is because the TabStrip widget initializes the animation properties from the options parameter in the constructor before it has merged them with the default options of the widget.  This happens on line 33128 of kendo.web.js (v2012.2.710).

that._animations(options);

In _animations() there is a check for animations:false, where it creates an empty animations object that simply does a show/hide.  But since the widget is using the empty options parameters without merging them with the widget's default options, there is no animations:false and this default "no animations" object never gets created.

So then, when the tab is clicked, in activateTab() the 'effects' property of the animation object is accessed, which causes the error because the default "false" animation object never got created (line 33979):

if (kendo.size(animation.effects)) {

It would seem to me that the options parameter should be merged with the default options before _animations() is called, so that the animations object gets set up properly.  Is this a Kendo bug, or am I approaching this the wrong way?  Thanks!

ryan

p.s. Note the commented section of my JSFiddle; this workaround solves the issue but is definitely not as clean as simply overriding the option, as we are attempting to do.  Alternatively, I could initialize the widget's default animation property to the object that gets set inside _animations(), but that is not ideal either because it depends on undocumented internals and not the published widget API.

Ryan
Top achievements
Rank 1
 answered on 27 Aug 2012
0 answers
113 views
Hi, I use Binding OData service to binding data from this example http://demos.kendoui.com/web/treeview/odata-binding.html 

I want to know How to Expand all node 

Thankyou



Nanthaphol
Top achievements
Rank 1
 asked on 27 Aug 2012
9 answers
202 views
I noticed that some android devices have issues with properly displaying a text box (an input element). The text appears invisible as you type because the text appears black over the black background. The device I am able to reproduce this on is the Google Nexus 7, using the forms demo on the Kendo UI site.

Is there a workaround that will guarantee that the text is a visible colour on all platforms? For example, white in android and black in iOS. 

Thanks in advance,
John
Berin
Top achievements
Rank 1
 answered on 27 Aug 2012
1 answer
154 views
Hi all,

Ok I have put a problem that many people read but nobody answered. So i guess it would be usefull to make a clearer explaination:

I have a very basic kendo grid bind to odata dataservice:
-----------------------------------------------------------------------

var

myDS = new kendo.data.DataSource({
type: "odata",
transport: {
//read: { url: "/Ajax/Lists/PassagesReports/LightService.svc/PRs/"
read: { url: "/testprs.js" //I put example here of JSON return by Odata so u can test
}},
schema: {
model: {
id:
"SeqId",
fields: prLight}},
pageSize: 10,
serverPaging:
true,
serverFiltering:
true,
serverSorting:
true,
sort: { field:
"SeqId" }
});

//I load it with:
//---------------
$(document).ready(

function () {
$(
"#gridPRs").kendoGrid({
dataSource: myDS,
height:
"auto",
scrollable:
false,
filterable:
true,
columns: [ { title: "Seq.", field: "SeqId", width: "65px", template: "<div class='dprcolpad'>#= SeqId #</div>" },{ title: "Lane", field: "LineId", width: "165px", template: "<div class='dprcolpad'>#= GetLine(LineId) #</div>" },{ title: "Description", width: "230px", field: "Description", template: "<div class='dprcolpad'>#= Description #</div>" }
],
sortable: {
mode: "single",
allowUnsort:
false
},
pageable:
true});

 //Here i defined button add click
//----------------------------------
$("#btadd").click(function () {
prLight.SeqId = "11";
prLight.LineId = 20;
prLight.Description = "London";
myDS.add(prLight);

});
});

//I defined my object :
-----------------------
var prLight = {
SeqId: { type: "string", filterable: false },
LineId: { type:
"number" },
Description: { type: "string" }};

//and finaly and example of odata that u can put in js file testprs.js to make all work:
----------------------------------------------------------------------------------------
 callback({"d" : {"results": [{"SeqId": "1", "LineId": 0, "Description": "London"}, {"SeqId": "5", "LineId": 1, "Description": "Mexico"}], "__count": "2"}})

Ok so far so good. so what the problem then? well if you click add button you get a very strange error :

 "d.d is undefined" from kendo.core.js.

if you change data type from odata to json. it works well. (But i want to use dataservice and odata in this case.

Any one can help?

Thanks
Laurent


T.
Top achievements
Rank 1
 answered on 27 Aug 2012
1 answer
154 views
I need to get the row identity value of the newly created record so that I can tie it to other data. How can I extract the results in the change event?

For example...

var dsEmployee = new kendo.data.DataSource({
 type: "odata",
 transport: {
  read: {
   url: baseUrl + "/DataService.svc/Employees",
   dataType: "json"
  },
  create: {
   url: baseUrl + "/DataService.svc/Employees",
   type: "POST",
   dataType: "json"
  },
  update: {
   url:  function (o) {
    return baseUrl + "/DataService.svc/Employees(" + o.EmployeeId + ")"
   },type: "PUT",
   dataType: "json"
  }
 },
 schema: {
  model: Employee
 },change: function (e) {
  ...
 
 }
}
Rosen
Telerik team
 answered on 27 Aug 2012
0 answers
86 views
Hello,
I´m new in kendo UI development. I´ve already developed an app for WP 7.5, and now, my goal is to change it for other plataforms. 
Here in the firm, we would like to develop an app for Blackberry OS, but, Is there a emulator that is possible view the app? 

As more questions arise, we´ll post to solve them.

Thanks in advance,

Thiago
Thiago
Top achievements
Rank 1
 asked on 27 Aug 2012
2 answers
78 views
At first I have discovered incorrect behavior of a grid in the my project, but you can see this bug in behaviour of a grid in demo examples: Inline editing and Popup editing. This bug does not allow modifying of data in the newly added record. The sequence of user actions leading to bug is shown in the attached image (inline editing).

Rosen
Telerik team
 answered on 27 Aug 2012
1 answer
135 views
Hi guys, I've got a strange problem with my grid that has server side paging.

what we have done is abstract the the Kendo grid away from out current code using obtrusive javascript like so

   var options = {
        reorderable: $(element).attr("data-grid-reorderable"),
        autoBind: $(element).attr("data-grid-autoBind"),
        groupable: $(element).attr("data-grid-groupable"),
        width: $(element).attr("data-grid-width"),
        height: "400",
        scrollable: true,
        columns: columns,
        dataSource: {
            transport: { read: { url: $(element).attr("data-grid-datasource-url"), data: window[$(element).attr("data-grid-datasource- data")] } },
            sortable: { mode: "multiple", allowUnsort: true },
            type: "aspnetmvc-ajax",
            filter: [],
            group: groups,
            schema: {
                data: $(element).attr("data-grid-schema-data"),
                total: $(element).attr("data-grid-schema-total"),
                errors: $(element).attr("data-grid-schema-errors"),
                model: model,
                scrollable: true
            },
            pageSize: $(element).attr("data-grid-datasource-pagesize"),
            serverPaging: $(element).attr("data-grid-datasource-pageable"),
            serverFiltering: $(element).attr("data-grid-datasource-filtering"),
            serverSorting: $(element).attr("data-grid-datasource-sortable")
        },
        pageable: $(element).attr("data-grid-pageable"),
        columnMenu: true
    };

this all works fine for the first page of the grid but the problem is when the page changes we return the data in exactly the same data structure that worked on page 1 but it doesn't work on page 2? the grid is just empty.

Can anyone help with this? it's a very strange issue because it works perfectly fine on the first page.

cheers.
ste.
Daniel
Telerik team
 answered on 27 Aug 2012
0 answers
91 views
I would like to have a ComboBox for the user to choose when a row is going to be updated.

How could I make a row template for update in which, a ComboBox is used for some fields?

Thanks.
danny
Top achievements
Rank 1
 asked on 27 Aug 2012
3 answers
76 views
Hi, According to my new requirement i have to modify some Wizard UI functionality and it's CSS styles. My question is how to inherit Kendo UI JS and CSS in my project? Is there any Intelligence support for Visual Studio 2010 or Is there any Intelligence support for any other development IDE? 

  
Daniel
Telerik team
 answered on 27 Aug 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
Chat
DateRangePicker
Dialog
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?