Telerik Forums
Kendo UI for jQuery Forum
11 answers
911 views
Basically what I'm trying to do here is expand and collapse two panels when one panel is expanded and collapsed.

The flyer panel bar expands just fine when the order panel bar is clicked.

However, the second time through, when the order panel bar is clicked and collapses, the flyer info panel bar does not also collapse.

I've looked through the javascript console, no errors are coming up and I've stuck an alert in the collapse portion which pops up, but still it does not collapse.

What else can I try to get these two panel bars in sync as far as when they expand and collapse?

$(
"#orderInfoPanelBar>li").on('click', function (e) {
 
    var flyerInfoPanelBar = $("#flyerInfoPanelBar").data("kendoPanelBar");
    var orderInfoPanelBar = $("#orderInfoPanelBar").data("kendoPanelBar");
 
    /* Expand the flyer panel bar if it is not already expanded */
    if (flyerInfoPanelBar.element.children("li").hasClass("k-state-active") != true) {
        //var panelBar = $("#flyerInfoPanelBar").data("kendoPanelBar");
        $("#flyerInfoPanelBar").data("kendoPanelBar").expand($("#li_flyerInfo1"));
        $("#flyerInfoPanelBar").data("kendoPanelBar").select($("#li_flyerInfo1"));
    }
 
    /* Collapse the flyer panel bar if the order panel bar is being collapsed as well */
    if (orderInfoPanelBar.element.children("li").hasClass("k-state-active") == true &&
        flyerInfoPanelBar.element.children("li").hasClass("k-state-active") == true) {
 
        $("#flyerInfoPanelBar").data("kendoPanelBar").collapse($("#li_flyerInfo1"));
    }
});
Chuck
Top achievements
Rank 1
 answered on 05 Mar 2015
1 answer
161 views
i have an example on plunker here:
http://plnkr.co/edit/FdMjVVLVHRcpHTCjhsT6
that runs fine on chrome (select multiple rows in the lower listview, then drag it to the top listview), but does NOT work at all in IE.  Should i be doing something different?  Or will this require a change in the kendo scripts?
Alexander Valchev
Telerik team
 answered on 05 Mar 2015
1 answer
98 views
I have a treeview with a parent and a child,
In each item, I don't just assign, but also an HTML Element, in my case it is a button,
so the item inside will be like: <span><button>Item</button></span>

If it is a parent, when I expand or collapse it, the button element is removed permanently and it will only leave the span and the text inside,
I noticed that this is only occur in 14xx kendo version of mine, but when I revert to 11xx, the bug wouldn't occur,

I have made a snippet as an example

In the snippet, the bug will only occur if the library code â€‹Kendo Q3 2014 â€‹â€‹SP1 â€‹or â€‹Kendo Q3 2014 SP2​ is selected,
if â€‹Kendo Q3 2014​ is selected, it will work just fine (the button will not be removed)
Alex Gyoshev
Telerik team
 answered on 05 Mar 2015
1 answer
140 views
Hello,

I'm trying to manually trigger upload widget remove event but with no success.
The event object passed to the callback is different and has no "files" field as when I'm clicking the original template "remove" button.
What I'm doing wrong?

Best regards!
Dimiter Madjarov
Telerik team
 answered on 05 Mar 2015
1 answer
141 views
Hello,

Here is my Kendo Grid Code. My first issue is if Click on edit, name field which I make editable: false not working. It is giving textbox. 

My second issue is, I want to give dropdown for age. How can I do this ?

 $("#grid").kendoGrid({
        columns: [
           { field: "id", hidden: true },
          { field: "name", title: "Name" },
          { field: "age", title: "Age" },
            { command: ["edit"] }
        ],
        editable: "inline",
        dataSource: [
           { id: "1", name: "Coal", age: "30" },
           { id: "2", name: "Gas", age: "29" },
           { id: "3", name: "Hydro", age: "35" }
        ],
        schema: {
            model: {
                id: "id",
                fields: {
                    id: { editable: false },
                    name: { editable: false },
                    age: { editable: true }
                }
            }
        },
    });
Alexander Popov
Telerik team
 answered on 05 Mar 2015
1 answer
84 views
Hello,

I am displaying Grid and using detailTemplate to expandRow. But when expand the row, I want to pass the row ID and get datasource and display another grid.

I think detailTemplate won't work in this case. How can I do this ?

Here is my Code

 $(document).ready(function () {
                   var dataSource = new kendo.data.DataSource({
                       pageSize: 20,
                       data: [
                         { id: "1", name: "Andrew", age: "30" },
                         { id: "2", name: "Robert", age: "29" },
                         { id: "3", name: "Frank", age: "35" }
                       ],
                       autoSync: true,
                       schema: {
                           model: {
                             id: "id",
                             fields: {
                                id: { editable: false, nullable: true, type: "number" },
                                name: { editable: false },
                                age: { 
                                    validation: { min: 0, required: true },
                                    editable: true, 
                                    nullable: true,
                                    type: "number"
                                }
                             }
                           }
                       }
                    });

                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 550,
                        editable: "inline",
                        columns: [
                            { field: "name",title: "Name" },
                            { field: "age", title: "Age", width: "180px"},
                            { command: ["edit"] }
                        ],
                                detailTemplate: "<div>Name: #: name #</div><div>Age: #: age #</div>"
                    });
                });
Nikolay Rusev
Telerik team
 answered on 05 Mar 2015
7 answers
308 views
How could I get the item ID of the list on a double-click event?

$("#autocomplete").data("kendoAutoComplete").bind("dataBound", function(event) {
  $(this).bind('dblclick', function(event) {
     // how to access the item ID of the item which was clicked?
  });
});

Kiril Nikolov
Telerik team
 answered on 05 Mar 2015
1 answer
98 views
Hi,

I need to setup cascading Dropdownlists for City and Zipcode in my MVC5 controller.  My Action is as follows:
01.public JsonResult GetZips()
02.{
03.    FreightEntities freight = new FreightEntities();
04.    var zips = freight.ZipCodes.AsQueryable();
05.    var city = freight.ZipCodes.AsQueryable();
06.    if (city != null)
07.    {
08.        zips = zips.Where(z => z.ZipID == zips);
09.    }
10.    return Json(freight.ZipCodes.Select(z => new {Zip = z.ZipID, State = z.StateID, City = z.City }), JsonRequestBehavior.AllowGet);
11.}
12. 
13. 
14. 
15.public JsonResult GetCity()
16.{
17.    FreightEntities freight = new FreightEntities();
18.    var state = freight.States.AsQueryable();
19.    var city = freight.ZipCodes.AsQueryable();
20.    if (state != null)
21.    {
22.        city = city.Where(s => s.StateID == state);
23.    }
24.    return Json(freight.ZipCodes.Select(s => new { State = s.StateID, City = s.City }), JsonRequestBehavior.AllowGet);
25. 
26.}

When I build, errors are thrown on the lines 8 and 22 above stating that operator == cannot be applied to operands of type int and System.Linq.IQueryable<FRCV2>.  I followed the dropdownlist example in the Kendo demo section, but it appears that I've not cast correct comparisons?  Can someone identify what I need to change in the above so that I can properly render these cascading dropdownlists?
Dimo
Telerik team
 answered on 05 Mar 2015
4 answers
3.9K+ views
Is there any documentation on how the numeric formats work exactly? I just want a simple non-decimal percentage text box(1-100%, whole numbers, no decimals), but I can't quite seem to figure out the right format. Here's my code:

$(".txtPct").kendoNumericTextBox({
                format: "p0",
                min: 0,
                max: 100,
                step: 1
            });

Any help would be appreciated. Also, any plans to update the documentation? There seems to be a lot of stuff that needs to be "discovered" by the developer at this point. Thanks!
Piyush Bhatt
Top achievements
Rank 1
 answered on 04 Mar 2015
1 answer
525 views
Here is my Kendo Datasource and code related to it. I want to display radio button list in Access Type column so that user can select Read or Read/Write or None type access. How can I pass that in my datasource ?I want radiobuttonlist at group level too.

var words = {
'count': 4,
'input': 'kendo',
'groups': [{
'field': 'Word 1',
'value': '3',
'items': [
{ 'Word': 'ACT', 'AccessType' : 'Read' },
{ 'Word': 'ADG', 'AccessType': 'Read' },
{ 'Word': 'ALF', 'AccessType': 'Read / Write' }
],
'hasSubgroups': false,
'aggregates': {}
}, {
'field': 'Word 2',
'value': '4',
'items': [
{ 'Word': 'BCB', 'AccessType': 'Read' },
{ 'Word': 'BCC', 'AccessType': 'Read / Write' },
{ 'Word': 'BCH', 'AccessType': 'None' },
{ 'Word': 'BCT', 'AccessType': 'Read' }
],
'hasSubgroups': false,
'aggregates': {}
}, {
'field': 'Word 3',
'value': '6',
'items': [
{ 'Word': 'CCC', 'AccessType': 'Read / Write' },
{ 'Word': 'CCT', 'AccessType': 'None' },
{ 'Word': 'CHH', 'AccessType': 'Read' },
{ 'Word': 'CFF', 'AccessType': 'None' },
{ 'Word': 'GCC', 'AccessType': 'Read / Write' },
{ 'Word': 'GCT', 'AccessType': 'Read' }
],
'hasSubgroups': false,
'aggregates': {}
}]
};

var wordsDataSource = new kendo.data.DataSource({
data: words,
schema: {
groups: 'groups',
},
group: {
field: 'length'
},
serverGrouping: true,
columns: [
{ field: "Word", title: "Sites" },
{ field: "Access", title: "Access" }
]
});

$("#grid").kendoGrid({
autoBind: false,
dataSource: wordsDataSource
});

wordsDataSource.read();
Alexander Valchev
Telerik team
 answered on 04 Mar 2015
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?