Telerik Forums
Kendo UI for jQuery Forum
1 answer
205 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
105 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
593 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
154 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
602 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
230 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
0 answers
187 views
Hi,

  I want to impliment the multiselect dropdownlist   and bind the multiple values to data base.Is it possible to impliment multiselect dropdownlist in listview .How can I impliment multiselect dropdownlist in listview.
srinivas
Top achievements
Rank 1
 asked on 05 Sep 2012
0 answers
86 views
when at grid last row trigger input blur validate
then error message is show at bottom, but grid not auto scroll to,
so the message can not see.
maybe should like normal input's validate
used span to show the error message, 
not use div(grid used)
Andy
Top achievements
Rank 1
 asked on 05 Sep 2012
0 answers
161 views
I lifted the code from the demos and have a div class = k-widget.

Unfortunately its not showing up on my page. I've looked at the examples, put my JS in order that it should but the styling doesn't come out. Any ideas?
axwack
Top achievements
Rank 1
 asked on 05 Sep 2012
0 answers
240 views
Hello...I'm using the Razor syntax for creating my pie chart and am having problems figuring out how to explode a slice using a databound pie chart. Here is the code that I thought would work...the object that is feeding the Pie has 2 attributes: Label holds the name and Value holds the value.
@(Html.Kendo().Chart<InfoSource.Requests.Models.Graph>()
                            .Name("myallocation")
                            .Title(title => title
                                .Text("MY ALLOCATION")
                                .Font("16px Oswald")
                            )
                            .Theme("Silver")
                            .Legend(legend => legend
                                .Visible(false)
                            )
                            .ChartArea(chartArea => chartArea
                                .Background("transparent")
                            )
                            .DataSource(ds => ds
                                .Read(read => read.Action("dMyAllocation", "Dashboard", new { area = "InfoSource.Metrics" }))
                            )
                            .Series(series => {
                                series.Pie(model => model.Value, model => model.Label, null, model => model.Label == "Unassigned" ? true : false)
                                    .Labels(labels => labels
                                        .Template("${dataItem.Label}")
                                        .Visible(true).Position(ChartPieLabelsPosition.InsideEnd)
                                    );
                            })
                            .Events(events => events
                                .SeriesClick("myallocationClick")
                            )
                            .Tooltip(tooltip => tooltip
                                .Visible(true)
                                    .Template("${dataItem.Label} - ${value}%")
                            )
                            .HtmlAttributes(new { style = "max-height: 300px;" })
                        )

From what I can understand, the series syntax includes on option for true/false if the pie should explode or not. I have set mine up using the Label text so that if the Label text is "Unassigned", the pie piece should explode. This is not happening however.

Can you let me know if my syntax is correct or not? Thanks.
Philip Senechal
Top achievements
Rank 1
 asked on 04 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
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?