Telerik Forums
Kendo UI for jQuery Forum
1 answer
317 views
my treeview ::
    var opcPath = "";
    var dataSource = new kendo.data.HierarchicalDataSource({
        transport: {
            read: {
                url: "../fwp/getOPCTree.fwp?opcPath=" + opcPath,
                type: "GET",
                dataType: "json"
            }
        },
        schema: {
            model: {
                id: "opcPath",
                hasChildren: "hasChildren"
            }
        }
    });
    //初始化OPC树
    treeview = $("#opcTreeView").kendoTreeView({
        select: onOPCTreeSelect,
        dataSource: dataSource,
        dataTextField: "nodeName",
        dataSpriteCssClassField: "nodeCSS",
        dataImageUrlField: "imageUrl"
    });

the treeview is async!!!!
i can get the id "opcpath".
when the root is expand, 
but the child is not expand,
then i want to expand the child child child .....node through the id.
how  to do??
Nohinn
Top achievements
Rank 1
 answered on 14 Sep 2012
1 answer
2.1K+ views
Hello,
Anyone come across this issue where the combobox widget does not display the selected item when using JQuery.val to set selected value.
Steps to reproduce:
- Go to to the demo page: http://demos.kendoui.com/web/combobox/index.html
- Open the Firebug console or similar.
- Enter the following:
 $('#select').data('kendoComboBox').value() --> outputs the current value: 'X-Small'
 $('#select').val() --> Also outputs the same
 $('#select').val('Small')

- Notice that the widget still displays 'X-Small', but both  $('#select').data('kendoComboBox').value()  and $('#select').val()  return 'Small'

Thanks.




Nohinn
Top achievements
Rank 1
 answered on 14 Sep 2012
0 answers
137 views
Is there a way to bind TreeView's selected node to a MVVM view model?
If not, what are recommended or popular workarounds? Or should I give up MVVM and use TreeView without it?
Alexei Kondratov
Top achievements
Rank 1
 asked on 14 Sep 2012
5 answers
193 views
How would I go about creating this query with the datasource?

http://services.odata.org/V3/Northwind/Northwind.svc/Customers()?$filter=Orders/any(o:substringof('alf',o/ShipName))&$expand=Orders

I currently don't see how I could get this to work with what is available. Thanks for the help in advance.
-Jon Ross
Atanas Korchev
Telerik team
 answered on 14 Sep 2012
3 answers
300 views

I have written the following code using ASP.NET MVC3 and it's throwing me an error at the bold line(.Model(Function(model) model.id(Function(p) p.CostCentreID). It's saying that the expression does not produce a value? I thought it's asking for a primary key column only? Isn't that the case?

Please help

@ModelType IEnumerable(Of Mail.BAL.CostCentre)

@Code
    ViewData
("Title") = "Index"
End Code

@(Html.Kendo().Grid(Model) _
   
.Name("CostCentres") _
   
.Columns(Function(modelItem) modelItem.Bound(Function(p) p.CostCentreID).Hidden) _
   
.Columns(Function(modelItem) modelItem.Bound(Function(p) p.CostCentre)) _
   
.Columns(Function(modelItem) modelItem.Bound(Function(p) p.Active)) _
   
.ToolBar(Function(toolbar) toolbar.Create()) _
   
.Groupable() _
   
.Pageable() _
   
.Sortable() _
   
.Scrollable() _
   
.DataSource(Function(datasource) datasource _
                   
.Ajax() _
                   
**.Model(Function(model) model.Id(Function(p) p.CostCentreID)) _**
                   
.Create(Function(create) create.Action("Create", "Home")))
   
)
Vivek
Top achievements
Rank 1
 answered on 14 Sep 2012
2 answers
301 views
What is the simplest way to hightlight the selected top level menu item using the Server Side Kendo Menu MVC Helper? The default behaviour does not highlight the selected item.

All I have is

@(Html.Kendo().Menu()
					.Name("menu")
                                    .Items(menu =>
                                    {
                                        menu.Add().Text("Home").Action("Index""Home");
                                        menu.Add().Text("About").Action("About""Home");
                                    }).Events(events => events.Select("onSelect"))
                    )

in my Layout.cshtml razor page. A small sample project would be ideal, if there is no simple way to hightligh the selected item.

Any help would be appreciated.
Thanks
Jean
Jean
Top achievements
Rank 1
 answered on 13 Sep 2012
5 answers
1.4K+ views
Good day,

I have a numeric textbox which looks like this:
$('#feeValue').width(250).kendoNumericTextBox({
	format: 'c2'
});

My culture is "en-ZA".

I need the textbox to allow me to change the cents value when I enter a currency amount.

Right now if I enter "R 5,25", as soon as the textbox looses focus, it changes the value to "R 5,00". It doesn't seem to round down, because if I enter "R 5,85", it still then goes back to "R 5,00".

I tried to set the "decimals: 2" parameter, and still nothing.
Is it maybe a type of format I need to have to be able to edit the cent value of the amount?

Can someone please point me in the right direction?

Thank you for your help.
Andres
Top achievements
Rank 1
 answered on 13 Sep 2012
2 answers
246 views
I have a timepicker which is defined in a kendo template.  The timepicker behaves as you would expect for a timepicker (drop down of times).  But when a time is selected from the dropdown, It then displays a full datetime string (Wed Sep 21...).  It does not behave as the timepicker does in the MVVM widget binding example (http://demos.kendoui.com/web/mvvm/widgets.html), which displays a time upon selection.  How can I get the timepicker to display just a time when selection from the dropdown is made?
Andres
Top achievements
Rank 1
 answered on 13 Sep 2012
2 answers
143 views
var chart = $("#chart").data("kendoChart");
chart.title.text = "Test";

Does not do it.
I get a JS exception:

Error: TypeError: chart.title is undefined

Thanks in advance for any help!
Joe Sugden
Top achievements
Rank 1
 answered on 13 Sep 2012
0 answers
135 views
Hello

I got a datasource returning following:

[
  {"id":"1","text":"host1","spriteCssClass":"server"}
  {"id":"2","text":"host2","spriteCssClass":"server"}
]

and following code

$("#treeview-hosts").kendoTreeView({
        dragAndDrop: true,
        dataSource: {
            transport: {
                read: {
                    url: "/main/getEnvHosts",
                    type: 'POST',
                    data: '{"env":"'+env+'"}',
                }
            },
            schema: {
                model: {
                    id: "id"
                }, 
            },
        }
     
});


I need to extract the ID from DataSource and have it assigned to the element, but not entirely sure how to to that. Available documentation is rather confusing...
Igor
Top achievements
Rank 1
 asked on 13 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?