Telerik Forums
Kendo UI for jQuery Forum
2 answers
96 views
Can the data of a Node contain the datasource that should be used to obtain its children ?

Consider a complicated heterogeneous environment. 
Some level in a tree has
Item-1 type X
Item-2 type X
Item-3 type Y
Item-4 type Z
Item-5 type A

When a node on this level is expanded, the type will be used to select the data source
Case X: Use backend table V_NEW_X 
Case Y: Use dynamic query constructed based on ui fields on page
Case Z: Use items the server scrapes from black box legacy webpage
Case A: Use static array in page

Thanks,
Richard


Richard
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
274 views
hello:
I have a problem about StockChart. Our requirement is to add new data to the StockChart after I get the new data from server. the following code is just a test fragment. But the problem is in the update function when I add the new data to StockChart. the stockchart will totally redraw all the chart. If add the new data to the chart frequently, it is not tolerated. we just need to add the new data at the end of line chart smoothly.  So do you know some options that I can use in this case?
         
  $("#container").kendoStockChart({
                title: {
                    text: "My test"
                },
                dateField: "D",
                dataSource: {
                  transport: {
                      read:"url to get datas"
                  }
              },
                series:[{
                    type:"line",
                    field:"V"
                }],
                axisDefaults:
                {
                    valueAxis: {
                        labels: {
                        template: "#=value#",
                        visible: true
                    }
                    }
                },
                navigator: {
                    series: {
                        type:"line",
                        field:"V"
                    }
                }
            });


            var updatefunction = function () {

                var kendoStockChart = $("#container").data("kendoStockChart");
                var d = new Date();
                kendoStockChart.dataSource.add({"D":d.getTime(),"V":1000});
                setTimeout(updatefunction, 10000);

            };
            setTimeout(updatefunction, 10000);
Iliana Dyankova
Telerik team
 answered on 21 Feb 2013
3 answers
682 views
Hi,
I have a grid that the pageSize will be 200 if is not iPad, and page size will be 20 if is rendered on iPad.
The end product will be just to iPad and Desktop, how can I do this checking using MVC Html Helper?
@(
 Html.Kendo().Grid(Model)
 
                .Name("Grid")
                .ClientDetailTemplateId("inventoryTemplate")
 
                .DataSource(ds => ds.Ajax()
                                .PageSize(200) // or .PageSize(20) if iPad
                                .Model(m =>
                                {
                                    m.Id(p => p.StockID);
                                })
                        .Read(r => r.Action("Read", "Home"))
)
Jose
Top achievements
Rank 1
 answered on 21 Feb 2013
3 answers
429 views
I have having a tough time figuring out how to achieve simply bindings in a tree view template:

This is my requirement:

- Bind checkbox of each node to an isVisible property on the node's underlying view model.  
- Bind click action of delete button to a method called remove() on the node's underlying view model.   

Treeview is bound to an underlying hierarchical datasource.  Items in datasource are created and added dynamically like this:


        createCategoryLegendModel(viewModel) {             
             return {
                 text : viewModel.label,
                 imageUrl:  this.url + viewModel.imagePath,  
                 expanded : true,                                    
                 viewModel: viewModel,
                 callme: function () { alert("view model called"); },  // test method            
                 layers :  [] 
             };
         }

dataSource.add(createCategoryLegendModel(viewModel));

This is the template I have:

<script id="treeview-template" type="text/kendo-ui-template">           
        <input type="checkbox" data-bind="checked : item.viewModel.isVisible" style = "margin-left:-5px"></input>                 
        <img data-bind="click : callme" title="click to remove"  src="@Url.Content("~/images/delete.png")" style ="margin-top:0px; height:16px; width:16px"/>          @* or item.viewModel.remove, which ever I can get to work *@
        <span> #: item.viewModel.label #</span>                    
        <span data-bind="text : text"> </span>          @* why does this not work *@    
</script>


Now, your checkbox example, shows how to render, but does not show us how to bind to an underlying view model.  So it does not really help me much.  Your  templates shows me how to render a button, but not how to bind its click to an underlying view model method yet these are things easily done using Knockout.   Also, I the way you bind click actions on the delete button in your templates sample, is susceptible to performance problems and breaks down my MVVM strategy.
Klaus
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
86 views
Can I use kendoDropDownList with kendo mobile license ? I can see that is in kendoDropDownList kendouiweb section.
Sebastian
Telerik team
 answered on 21 Feb 2013
3 answers
56 views
How can i get a scroll bar like on sitefinity.com?

Does it use kendo UI ?
Sebastian
Telerik team
 answered on 21 Feb 2013
1 answer
55 views
I didn't know where to put this.
It looks like this demo the code and what is rendered at the top do not match. http://demos.kendoui.com/web/grid/rowtemplate.html

the rendered has rows with column headings 
Cover Title Rating


and this is what the code says they should be.

.Columns(columns =>
    {
        columns.Bound(c => c.CustomerID).Title("Picture");
        columns.Bound(c => c.ContactName).Title("Name");
        columns.Bound(c => c.CompanyName);
        columns.Bound(c => c.Country);
        columns.Bound(c => c.Address);
        columns.Bound(c => c.Phone);
    })

I still get the concept I think but it would be nice if they actually matched.l

Atanas Korchev
Telerik team
 answered on 21 Feb 2013
1 answer
472 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
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
Drag and Drop
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?