Telerik Forums
Kendo UI for jQuery Forum
2 answers
353 views
i'm using window for show content, all is ok but animation not work.

My code:

$("#window").kendoWindow({
        modal: true,
        width: "250px",
        height: "150px",
        title: "Title",
        actions: ["Refresh", "Maximize", "Close"]
    });
$("#open").click(function () {
        $("#window").data("kendoWindow").center().open();
    });
$("#close").click(function () {
         $("#window").data("kendoWindow").close();
    });

What is wrong?
Window have default animation?
Thanks.
Mythox
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
145 views
I have two separate js files. one contains a kendo observable object. when I set viewmodel's object property from another js file, the object is set but object's properties are still undefined.

<script type="text/javascript">
    var previewModel = kendo.observable({
        question: {}
    });
    kendo.bind($("#preview-question"), previewModel);
</script>
<div id="preview-question">
    <div data-bind="text: question.QuestionText"></div>
</div>

another-js-file.js
previewModel.set("question", ko.toJSON(self.question()));

this code sets the question object but its properties still undefined.
Ahmet
Top achievements
Rank 1
 answered on 05 Sep 2012
0 answers
72 views
Hi im trying out KendoUi Mobile and need some help

I want to style a view with my own style (backgrounds etc.)
The app should load the different views from a database and each view may have its own backgrounds etc.
So what i want to do is :
<div data-role="view" data-layout="overview-layout" id="testview" data-title="testview title" style="
background:url('.$pageinfo['backgroundimage'].');
background-repeat:no-repeat;
-moz-background-size:100% 100%;
background-size:100% 100%;">

In this case i need the background image to fill the screen even if there is no content

It seems like when rendering my custom styling is not used at all.


Any solutions ?

Thanks alot guys.

Tom



Tom
Top achievements
Rank 1
 asked on 05 Sep 2012
2 answers
161 views
Hi,
I am in the process of updating our Company Website and found Kendo UI, which seems exactly what I need.
Though, there is one problem I came across, which seems like I can't find an easy solution to it. We are using Graphs (mainly bar and line) and I would need a dropdown field/html code in the title of the chart (or anywhere else in/on/around the chart).
When I try HTML code in the Title, it either just doesn't work or messes everything up.

The only solution I can think of, is with another div unrelated to the chart, but this would be a really unsatisfying solution. So I was wondering, is there any way this can be done or added?
Otherwise this seems like a really great product!

Cheers,
Markus
uzi
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
163 views
Hi!
I have following issue: if "this" keyword used in source binding, MVVM recreates the whole DOM starting from this node if any child value of "this" observable model changes. here is a fiddle to reproduce it:
http://jsfiddle.net/uBgnr/21/ 

If instead of "this" model member is used, DOM is not recreated, here is another fiddle:
http://jsfiddle.net/uBgnr/20/

In this case I could avoid this behavior, but I have following scenario and I could not change data structure:
I have an array of elements to be bind in a div. But the problem is: each of element has it's own template, stored in field "template", so I could do following:
<div data-template="element" data-bind="source:elements"></div>
<script id="element" type="text/x-kendo-template">  
    <div data-template="#=template#" data-bind="source:this"></div>
</script>

this will work, but as I said if any child field of  my view model will be changed, MVVM recreates div with "source:this" binding

using "#if" inside element template is not an option, templates are huge, and could be used also not only within "elements" binding, so I need to copy/paste them, its dirty. 

Suggestion: it would be nice something like this:
<div data-template-field="template" data-bind="source:elements">

Please help.
Alexander Valchev
Telerik team
 answered on 05 Sep 2012
5 answers
73 views
Hi Kendo guys,

When I try to force platform blackberry on android, all the icons show blank boxes.

app = new kendo.mobile.Application($(document.body), {platform: "blackberry" });

Everything works great on the desktop browsers, i.e. Safari and Chrome, but on Android I get empty boxes.

I tried to debug the issue, using Chrome Debug Console, I found that I can replicate the same on Desktop by removing the tick from the style:
-webkit-mask-image: url("images/icons.png");

If I use, ios or android as platform, everything works. Except the blackberry.

On a side note, I already tired this CSS and it has no impact.
.km-blackberry
{
    -webkit-transform: translatez(0);
    -webkit-transition: -webkit-transform .0001ms;
}

Any solution?
Kamen Bundev
Telerik team
 answered on 05 Sep 2012
3 answers
548 views
Hello,

I want to create an admin module to create states/provinces. I have a database with two tables, states and countries.
In the states table, we have a name and country_id, referring to the table countries.

I've used CRUD for the countries, which is working great.

For the states i collect the data: states.id, states.name, states.country_id, showing in the table.
When i edit a row (popup), I use a kendoDropDown which is also working correctly. 

Now what i want to achieve is when showing the grid, i don't show the country_id, but i want to see the corresponding countries.label.

I've tried to change the transport:read to remove the country_id and replacing it with countries.label, but then the combobox isn't working properly. 

Can anybody help me?

Thanks,
vince


I use the following code:
$(document).ready(function () {
            var crudServiceBaseUrl = "/crm/api.php?",
                        dataSource = new kendo.data.DataSource({
                            transport: {
                                read:  {
                                    url: crudServiceBaseUrl + "class=States&action=view",
                                    dataType: "json"
                                },
                                update: {
                                    url: crudServiceBaseUrl + "class=States&action=update",
                                    dataType: "json"
                                },
                                destroy: {
                                    url: crudServiceBaseUrl + "class=States&action=delete",
                                    dataType: "json"
                                },
                                create: {
                                    url: crudServiceBaseUrl + "class=States&action=add",
                                    dataType: "json"
                                },
                                parameterMap: function(options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return {models: kendo.stringify(options.models)};
                                    }
                                }
                            },
                            batch: true,
                            pageSize: 30,
                            schema: {
                                model: {
                               id: "id",
                                    fields: {
                                        id: { editable: false, nullable: true, type:"number" },
                                        name: { type:"string", validation: { required: true } },
                                        country_id: { type:"string", validation: { required: true } },
                                    }
                                }
                            }
                        });


                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        sortable: {
                            mode: "single",
                            allowUnsort: false
                        },
                        filterable:true,
                        columns: [
                            { field:"id", title: "ID" , width: "80px"},
                            { field: "name", title:"Name"},
                            { field: "country_id", title:"Country", editor: cntry_combo_editor},
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "185px" }],
                        editable: "popup"
                    });
                });
           
function cntry_combo_editor(container, options) {
                $('<input name="' + options.field + '"/>').appendTo(container).kendoDropDownList({
                            autoBind: false,
                            dataSource: {
                                type: "json",
                                transport: {
                                    read: "/crm/api.php?class=Countries&action=view"
                                }
                            },
                            optionLabel: "Select Country",
                            dataTextField: "label",
                            dataValueField: "id"
                        });
            }
Paolino
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
118 views
I posted a ticket on September 1st, I know its weekend, thus I waited until its business days! Now its more than 48 hours since business days started, and yet no response to my ticket. Keeping in mind that I have 48 hours dead line reply.

Its a great product, and support seemed fine on forums and its what made me buy the product. But once you buy, no more support?!

Update: Support replied to my ticket and apologized for the delay. 
Kamen Bundev
Telerik team
 answered on 05 Sep 2012
3 answers
561 views
Hi,
i need to add some new button on toolbar. 

I try to define a toolbar options like this

  toolbar: [{name:"Nuova Attivit&agrave;",  imageClass: "k-icon k-add" },
               { name: "Ricerca", className: "k-grid-ricerca", imageClass: "k-icon k-i-search" },
               { template: $j("#Toolbar").html() } 
],

....and the script template:

    <script type="text/x-kendo-template" id="Toolbar">    
<form id="frmSearch" name="frmSearch" style="display:none">
<label class="nome-label" for="nome">Nome:</label>
<input type="nome" id="nome" style="width: 130px"></input>
</form> 
    </script>

i try to select the custom class k-grid-ricerca but it doesn't work.

$j(".k-grid-ricerca").click(function(){
alert("hello");
});

do you have some solutions? Thanks
Fabio
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
186 views
Hi,

I am a bit of a novice and was hoping to get some help with a line chart that I am working on.  The code for the chart is pasted below.  For whatever reason, I am unable to see the plotbands.  What am I doing wrong?

Thank you,
Jon

$("#change-in-temperature").kendoChart({
                //dataSource: stocksDataSource,
                series: [{
                    name: "Change in temperature",
                    data: [45, 52, 59, 50, 57]
                }],
                autoBind: false,
 
                seriesDefaults: {
                    type: "line",
                    overlay: {
                        gradient: "none"
                    },
                    markers: {
                        visible: false
                    },
                    majorTickSize: 0,
                    opacity: .8
                },
 
                seriesColors: defaultSeriesColors,
 
                valueAxis: {
                    plotBands: [{
                        from: -100,
                        to: 0,
                        color: "#000",
                        opacity: 0.9
                        }],  
                    min: -100,
                    max:100,
                    line: {
                        visible: false
                    },
                    title:{
                        text: "Change in temperature",
                        color: "#727f8e"
                    },
 
                    labels: {
                        format: "{0}",
                        skip: 2,
                        step: 2,
                        color: "#727f8e"
                    },
                    axisCrossingValue: -100,
                        majorUnit: 10,                   
            },
 
 
                categoryAxis: {
                    //field: "date",
                    categories: [
                                new Date("2011/12/30"),
                                new Date("2011/12/31"),
                                new Date("2012/01/01"),
                                new Date("2012/01/02"),
                                new Date("2012/01/03")
                            ],
                    labels: {
                        format: "MM/dd",
                        color: "#727f8e"
                    },
 
                    line: {
                        visible: false
                    },
 
                    majorTicks: {
                        visible: false
                    },
 
                    majorGridLines: {
                        visible: false
                    }
                },
 
                legend: {
                    visible: false
                },
                tooltip: {
                        visible: true,
                        format: "{0:NO}",                  
                        opacity: 1
                    },
            });


Hristo Germanov
Telerik team
 answered on 05 Sep 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?