Telerik Forums
Kendo UI for jQuery Forum
13 answers
1.8K+ views
Is there a way to highlight the selected menu item, as in the MVC menu?

Thanks in advance
Georgi Krustev
Telerik team
 answered on 04 Apr 2014
1 answer
344 views
I wanted to ask if it was possible to cause a widget to sort by nested objects' properties. For example, if I had  a data source like the one below, could I sort the data source by parent.name? 

var data = [
    { student: { name: "Peter" }, 
      parent: { name: "Sally"} 
    },
    { student: { name: "Steven" }, 
      parent: { name: "Logan"} 
    },
    { student: { name: "Michael" }, 
      parent: { name: "Liz"} 
    }
];

The hierarchical data source api doesnt have anything on sorting, and the normal datasource api shows how to sort, but not for hierarchical structures. 

Thanks for help!
Alexander Popov
Telerik team
 answered on 04 Apr 2014
1 answer
59 views
Hello,

I have a StockChart with couple area graphs, and a navigator, and whenever I navigate around, I lose my crosshair... 
Before any navigation, crosshair is visible and works, but after some moving around, it goes invisible, I check the chart object,
and see that its visible option is true...

Tho I do not know if it is related but, I have seen this option as false;
myChart._plotArea.crosshairs[0]._visible = false

Please help me with this issue... Really irritating :(
Thanks!
Iliana Dyankova
Telerik team
 answered on 04 Apr 2014
1 answer
47 views
I have a grid that is hosted inside an iFrame.  When using IE8 the handle for column resizing does not show.  If I open the iFrame page in a regular window the resize behaves as expected.  This works fine in Chrome, Firefox, and IE9 & up.  I have not tested in any version older than IE8.
Dimo
Telerik team
 answered on 04 Apr 2014
1 answer
180 views
I am specifying a custom filter UI for a column where I am making some fairly significant changes. I've noticed that the default filter UI uses data-bind attributes that reference filters[0].value (for example). Is there a way to inspect/debug the view model?

One of my changes is to use a MultiSelect control, so I was wondering if it was possible to use data binding attributes to keep the selected values in sync with the grid's filters.

Also is there any way to modify the view model? for example if I wanted to add a property that indicated whether the filter operator was either 'eq' or 'neq' can I add this to the view model in some way?

 
Alexander Popov
Telerik team
 answered on 04 Apr 2014
3 answers
112 views
When setting the PanelBar dataSource property, it adds a dropdown (ie a HasChildren indicator) even if there are no items in the array.
Would this be a reasonable change request to make - to not do this?

Basically if you do this
 items: [
                            {
                                text: "Sub Sub Item 1",
                                value: "Sub Sub Item 1 Value",
                                items: []
                            },

You can test this by modifying the code as above on this fiddler.
http://jsfiddle.net/bundyo/WM4VG/light/

This is quite a pain, in my case, as I'm populating the dataSource from a C# DTO object. I have "items" as a property and cannot easily just "remove" it. Nor should I need to, in my opinion.
Kiril Nikolov
Telerik team
 answered on 04 Apr 2014
4 answers
1.9K+ views
But I don't want to use the the k-numerictextbox I just want a normal Textfield that only accepts numeric values without decimal points. Is there any way to accep numeric values besides using type: "number". What my team doesn't want is to use the little increase/decrease buttons.

Also how do I add a pocentage at the end of the value?

Here is the code I have so far

dataSource = new kendo.data.DataSource({
        data: [],
        schema: {
            model: {
                fields: {
                    ServiceItem: { editable: true, nullable: false, defaultValue: { ShortDescription: "Please select", Rate: "N/A", UnitOfMeasure: "N/A" } },
                    UnitPrice: { editable: false, validation: { required: true } },
                    Quantity: { editable: true, type: "number",validation: { required: true, min: 1 } },
                    UnitOfMeasure: { editable: false, nullable: true },
                    Discount: { editable: true,type: "number", validation: { min: 0, max: 100, required: true } },
                    Total: { type: "number", editable: false, validation: { min: 0, required: true } }
                }
            }
        },
        aggregate: [{ field: "Total", aggregate: "sum" }]
                    
    });

    $("#grid").kendoGrid({
        dataSource: dataSource,
        toolbar: ["create"],
        scrollable: false,
        batch: true,
        columns: [
            {
                field: "ServiceItem", title: "Service/Items", editor: serviceItemDropDownEditor, template: "#= ServiceItem.ShortDescription# \u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].ServiceType.Id\u0027 value=\u0027#= ServiceItem.Id #\u0027 /\u003e" +
                  "    \u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].ShortDescription\u0027 value=\u0027#= ServiceItem.ShortDescription #\u0027 /\u003e" +
                  "    \u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].Description\u0027 value=\u0027#= ServiceItem.Description #\u0027 /\u003e"
            },
            { field: "UnitPrice", title: "Unit price", format: "{0:c}", width: "150px", template: "#= ServiceItem.Rate# \u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].Rate\u0027 value=\u0027#= ServiceItem.Rate #\u0027 /\u003e" },
            { field: "Quantity", title: "Quantity",format: "{0:c}", width: "150px", template: " #= Quantity #\u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].Quantity\u0027 value=\u0027#= Quantity #\u0027 /\u003e" },
            { field: "UnitOfMeasure", title: "Unit of measure", width: "100px", template: "#=ServiceItem.UnitOfMeasure #\u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].UnitOfMeasure\u0027 value=\u0027#= ServiceItem.UnitOfMeasure #\u0027 /\u003e" },
            { field: "Discount", title: "Discount", width: "100px" },
            { field: "Total", title: "Total", width: "100px", template: "#= (ServiceItem.Rate * Quantity) - ((ServiceItem.Rate * Quantity) * (Discount/100))#  \u003cinput type=\u0027hidden\u0027 name=\u0027Details[#= index(data)#].Total\u0027 value=\u0027#= ServiceItem.Rate * Quantity - Discount#\u0027 /\u003e" },
            { command: ["delete"], title: "&nbsp", width: "100px" }],
        editable: {
            confirmation: "Are you sure you want to delete this item?",
            mode: "incell",
            template: null,
            createAt: "bottom"
        },
        save: function (data) {
            if (data.values.ServiceItem)
                data.model.Total = (data.values.ServiceItem.Rate * data.model.Quantity) - ((data.values.ServiceItem.Rate * data.model.Quantity) * (data.model.Discount / 100));
            else if(data.values.Quantity)
                data.model.Total = (data.model.ServiceItem.Rate * data.values.Quantity) - ((data.model.ServiceItem.Rate * data.values.Quantity) * (data.model.Discount/100));
            else if (data.values.Discount)
                data.model.Total =  (data.model.ServiceItem.Rate * data.model.Quantity) - ((data.model.ServiceItem.Rate * data.model.Quantity) * (data.values.Discount/100));
            this.refresh();
        }
    });


Thank you
Dimiter Madjarov
Telerik team
 answered on 04 Apr 2014
1 answer
133 views
I have an issue with a grid header expanding when I add more data.

My client code is:

var clientDataSource = new kendo.data.DataSource({
schema: {
model: {
id: "id",
fields: {
RecordId: { type: "string" }
,RecordType: { type: "string" }
,RecordName: { type: "string" }
}
}
}
,data:[]
});

$(document).ready(function () {
$("#gridNotificationObject").kendoGrid({
columns:
[{field: "RecordType",title: "Type", width:100}
,{field: "RecordName",title: "Name"}
]
,sortable:true
,selectable: true
,filterable: false
, scrollable: true
, size: { height: 250 }
,dataSource: clientDataSource
});
});

I am adding data with:

clientDataSource.add({
RecordId: type + id
,RecordType: title
,RecordName: name
});
clientDataSource.sync();
Dimo
Telerik team
 answered on 04 Apr 2014
6 answers
216 views
I have a button group for a mobile app and i have to use "up" for selectOn because it is on a scrolling page.

I need to make it so that when the user taps a particular button (say button4) in the group, a confirmation dialog appears asking them if they are sure they wanted to do that.  

So say the user currently has button2 selected.  They tap button3, the confirmation dialog appears, and they hit cancel.  How can i make it so button2 stays selected if they hit cancel?  
Kiril Nikolov
Telerik team
 answered on 04 Apr 2014
1 answer
74 views
I just wanted to share a post I did for date validation.

I recently had a project that I had to do 3 different date formats on the screen and need to validate all of them so I put out a post show how I did it so that I might help someone else.

Here is the link and the post also has a fiddle

ChiliFunFactory
Sebastian
Telerik team
 answered on 04 Apr 2014
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
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?