Telerik Forums
Kendo UI for jQuery Forum
1 answer
474 views
I have a remote data source (rds) that will deliver the tree view nodes items.
Elsewhere on the page there will be check boxes to allow the subtrees of various campaigns to be turned on and off.

The treeview template setting appears to only affect the 'k-in' span of a 'treeitem' li as rendered by the treeview control.

My situations is that the rds will supply additional item data about the nature of the item
{ id: ..., hasChildren: true, data:{addClass:'Campaign1'} }


I want the data.addClass value added to the class of the containing <li> that will be rendered.

The outcome desired looks like 
<li role="treeitem" class="k-item ... Campaign1" data-uid="..." id="...">
<div class="k-top/mid/bot"
<span class="k-icon ..." role="presentation"></span>
<span class="k-in"> TEMPLATE RENDERING GOES HERE </span>
</div>
</li>

Is there a way some javascript in the template setting can perform the desired tweak on the <li>?
Will I need to handle a 'children-loaded' event and iterate over the freshly rendered nodes ?

Petur Subev
Telerik team
 answered on 21 Feb 2013
2 answers
307 views
I'm trying to create a linear gauge, where ONLY the pointer is shown. The scale and all other furniture needs to be hidden, as we are displaying the pointer over a custom image in our web page.
My code for the gauge so far is as follows:

@(Html.Kendo().LinearGauge().Name("LinGauge" + @Model.ComponentName.Replace(" ",""))
    .Pointer(pointer => pointer.Size(30.0)
                   .Color("Black")
                   .Value(@Model.ComponentScore / 1000.0)
                   .Shape(GaugeLinearPointerShape.Arrow))
    .Scale(scale => scale.Min(0.0)
                 .Max(1.0)
                 .Vertical(false)
                 .MinorTicks(t => t.Visible(false))
                 .MajorTicks(t => t.Visible(false))
                 .Labels(l=>l.Visible(false))))

This is almost there, and displays the pointer with just a single, undecorated line where you would expect the scale to be (see attached image), but I can't seem to find in the API reference how you would switch that line off. Any help would be appreciated.

Chris
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
250 views
Hi,

I'm evaluating Kendo UI for our web / mobile project at the moment. I have browsed through the documentation and did not find much information on customizing chart Markers. I am looking for something similar to this high chart demo (specifically the marker line that shows up when you mouse over the data points). Can this functionality be replicated via Kendo UI DavaViz? Also, can we grab the tooltip values on mouse over and display it somewhere else on the chart; lets say near the legend?

http://www.highcharts.com/demo/line-ajax


Iliana Dyankova
Telerik team
 answered on 21 Feb 2013
14 answers
424 views
Since I have update my trial version(it was 2012.3.1314) to commercial version(2012.3.1315)
) we got a new issue. Column reordering does not work at all. I think it is an issue with kendoDraggable. Here is the JsFidddle .

Here is the GithHub issue
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
2 answers
163 views
Given something along the lines of below I am trying to use the custom editor function of the grid to show a different control based on the data type.  Data types are not limited to string, date, and boolean, but would also include some custom lists.  In the demo for custom editors on fields the demo leads me to believe that the editor is column based, and cannot be row based.  Is there a way to accomplish row based editors on the grid control?
<div id="me">
    <div id="kendoGrid"></div>
</div>
 
<script type="text/javascript">
    var viewModel = {
        items: []
    };
 
    viewModel.items.push({ id: 0, dataField: new Date(2012, 1, 1), dataType: 'date' });
    viewModel.items.push({ id: 1, dataField: 'any string', dataType: 'string' });
    viewModel.items.push({ id: 2, dataField: true, dataType: 'boolean' });
 
    $(document).ready(function () {
        $("#kendoGrid").kendoGrid({
            dataSource: {
                data: viewModel.items,
                batch: true,
                schema: {
                    model: {
                        id: "id",
                        fields: {
                            id: { editable: false, nullable: false },
                            dataField: {}
                        }
                    }
                }
            },
            columns: [{
                field: "dataField",
                title: "Attribute Value"
            }],
            editable:true
        });
    });
</script>
Phil
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
65 views
If the value axis max is under 1,000 it works fine.  But when the max exceeds 1,000 the chart is blank.

What am I missing.
Iliana Dyankova
Telerik team
 answered on 21 Feb 2013
5 answers
302 views
Hello,

I've recently updated to the latest build of Kendo Mobile.

I have been working on integrating the mobile framework into a CMS that has a dynamically generated navigation and objects. One of the things I am struggling with the most is the use of hashtags within the URL's.

For example:
I have a dynamic navigation that outputs the tabstrip nav like this:

<div data-role="footer">
                <div data-role="tabstrip" id="custom-tabstrip">
                <a href="/" data-icon="home">Home</a>
                 
               <a href="/gallery/" data-icon="camera">Gallery</a>
                 
               <a href="/blog/" data-icon="compose">Blog</a>
                 
               <a href="/contact/" data-icon="globe">Contact</a>
                 
               <a href="?mobileFormat=false" data-icon="action">Full Site</a>
                </div>
</div>
Each href is a dynamic page generated by the CMS. Unfortunately, whenever a link is clicked, Kendo insists on adding a hashtag in the URL, thinking it's a local view (i.e. http://kendo.themodmedia.com/#/gallery). I've even tried using absolute URL's in the href and the output is like this: http://kendo.themodmedia.com/#/http://kendo.themodmedia.com/gallery.

Is there a way to tell Kendo that if the href does not start with a hash tag, then it is not a local view?

Another example is that the CMS contact form outputs a string appended to the URL when the form is submitted. Something like
"?nocache=1#form1234567890" which jumps to a div of that id that displays the form response (i.e. "Thank you!"). The problem is that because that hash tag is in the URL, Kendo tries to load it as a local view, which doesn't exist.

Is there a global way to tell Kendo "If the div contains a data-role of "view" try to load a view; if not, just behave normally"? It just seems like Kendo is trying to force everything into a view and forgets that hash tags are still used for other things within a website.

Here is the demo site: http://kendo.themodmedia.com?mobileFormat=true (once the URL is loaded, you can remove the ?mobileFormat=true string).

Thanks!
Ronnie
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
1 answer
343 views
Hi,

How can we bind the Knockout observable array into the kendo treeview?

I am glad to know both the ways, Bindng the knockout observable array directly into the knedo treeview if possible
and convertng the knockout observable array into kendo hierarchical data and then binding into the kendo treeview if first option is not possible.

Is it possible to provide a sample application?

Thanks,
Mallappa
Atanas Korchev
Telerik team
 answered on 21 Feb 2013
1 answer
314 views
I have a editable grid (inline) that contains a currency field, in pt-BR culture.

When I'm adding a new row, if I put the value 0,23 for example, and click Update, the grid now shows the value R$ 23,00.

How can I correct that bug? I've already checked if the culture script is set properly...

Here is my code (AdditionalPrice is the field)

var dataSource = new kendo.data.DataSource({
            transport: {
                read: "/Product/OptionGridRead",
                update: {
                    url: "/Product/OptionGridUpdate",
                    type: "POST"
                },
                destroy: {
                    url: "/Product/OptionGridDestroy",
                    type: "POST"
                },
                create: {
                    url: "/Product/OptionGridCreate",
                    type: "POST"
                }
            },
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        Name: { validation: { required: true } },
                        AdditionalPrice: { type: "number", validation: { required: true } },
                        IsDefault: { type: "boolean" }
                    }
                }
            }
        });

        $("#grid").kendoGrid({
            height: 190,
            width: 200,
            dataSource: dataSource,
            toolbar: ["create"],
            columns: [
                { field: "Name", title: "Nome", editable: true },
                { field: "AdditionalPrice", title: "Valor Adicional", format: "{0:c2}", width: "150px" },
                { field: "IsDefault", title: "Padrão", width: "100px", template: '<input type="checkbox" name="IsDefault_#= id #" value="#= id #" id="IsDefault_#= id #" disabled="disabled" ${IsDefault==true?"checked":""} />'},
                { command: ["edit", "destroy"], title: " ", width: "210px" }],
            editable: {
                mode: "inline",
                createAt: "bottom"
            },
        });
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
1 answer
160 views
i need to generated a simple line chart using an array generated from form value calculations. What is the best way to accomplish this.  I tried the bind to local data, but I don't know how to update the local data based on the array calculations.
PHP array
Array
(
    [0] => Array
        (
            [name] => 0.1
            [value] => 422.19
        )

    [1] => Array
        (
            [name] => 0.2
            [value] => 256.77
        )

    [2] => Array
        (
            [name] => 0.4
            [value] => 143.96
        )...
bound local data
                var windowSizeMbs = [
                    {
                        "country": "United States",
                        "rtt": "0.1mS",
                        "value": 108.81
                    },
                    {
                        "country": "United States",
                        "rttms": "0.2mS",
                        "value": 100.47
                    },
                    {
                        "country": "United States",
                        "rttms": "0.4mS",
                        "value": 87.11
                    },.....

John
Top achievements
Rank 1
 answered on 21 Feb 2013
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
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
Licensing
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?