Telerik Forums
Kendo UI for jQuery Forum
8 answers
1.5K+ views

How can I force DropDownList to open popup up?

I found this, but it is not working.

Marie-Claude
Top achievements
Rank 1
 answered on 11 Apr 2019
7 answers
1.1K+ views
I have an index html page with a main grid that has a column that is bound.   This works....the user clicks...it routes correctly to gotoView3.   But I have a detail grid that is bound to this main grid
and the exact same column template does not work.  What is the syntax to get this line to route correctly?

template: '<a href=x   data-bind=\'click: goToView3\'  >#=Unit#</a>'


Here is the code

--------index.html------------------

 <script id="index" type="text/x-kendo-template">  

 <div data-role="grid"                                               
  data-editable="false" 
  data-detail-init="viewModelIndex.mainDetailInit"   
  data-columns="[ { field: 'Fleet', title: 'Fleet', width: 80, template: '<a href=x  data-bind=\'click: goToView3\' >#=Fleet#</a>'}  ]"
               data-bind="source: dsFleets, events: { dataBound: dataBound }"
               style="height: 400px">
              </div>

</script>


---------viewmodel.js-----------------------


var viewModelIndex = kendo.observable({



  goToView3: function(e) {
    router.navigate("/ops?fleet=" + e.data.FleetId);
    e.preventDefault();
  },




  dsFleets: new kendo.data.DataSource({
    data : [
      {
        FleetId  : "1",      
        },
        {
        FleetId  : "2",         
        },  
 ],
schema: {
   model: {
     fields: {
      FleetId: { type: "string" }, 
   }
   }
}
}),




mainDetailInit: function (e) {
    $("<div/>").appendTo(e.detailCell).kendoGrid({

        dataSource: {
            data:  [
                {       
                FleetId : "1",            
                Unit  : "P0014",   
                },
                {                
                FleetId : "1",            
                Unit  : "P0015",   
                    }
            ],
            schema: {
                model: {
                    fields: {                      
                        FleetId: { type: "string" },     
                        Unit: { type: "string" },
                    }
                }
            },
            pageSize: 20,
            filter: { field: "FleetId", operator: "eq", value: e.data.FleetId }
        },


        scrollable: false,    
        columns: [                 
            { field: "Unit", title: "Unit", width: 200, template: '<a href=x   data-bind=\'click: goToView3\'  >#=Unit#</a>'},           

        ]

    })},

});


Alex Hajigeorgieva
Telerik team
 answered on 11 Apr 2019
4 answers
1.2K+ views
Hi

I want to display the data in  a grid format from a data source(i.e. XML file) using Kendo Grid UI.

Pls send some solution for this.

Thanks 
A R
Tsvetina
Telerik team
 answered on 10 Apr 2019
2 answers
175 views
Hello,


I would like to create a multi-grouping chart.
Every series have a set of sub series order by data.

For example i have 5 group with different name.

Every group have a sub gruop of 2 elements.

My goal is to have the x axis divided into 5 sectors.
Each sector contains the two values of the various sub-groups of the related group.
How set the kendoChart options?

Like the attached picture.

thank you
Konstantin Dikov
Telerik team
 answered on 10 Apr 2019
4 answers
727 views

I have a series of complex update forms for various grids. These are not easily represented as editor templates. Much of the UI is variable and changes to the rendered form would have to be done with JavaScript.

Ideally, I would like to use popup editing but with the contents of the popup coming from a PartialView in an ajax call. Is this at all possible and is there a recommended way of doing it?

I managed to get part of the way to a solution but the final piece (saveRow() and cancelRow()) does not work.

Here is a rough outline of my method (grid BeforeEdit event):

01.var onBeforeEdit = function(e) {
02.    e.preventDefault();
03.    var grid = e.sender;
04. 
05.    var url = "example/controller/action";
06. 
07.    if ($("#generic-edit-dialog").length === 0) {
08.        $("body").append("<div id='generic-edit-dialog'></div>");
09.    }
10. 
11.    var html ="<div id='generic-edit-dialog-content' class='dialog-content'></div>";
12.    html += "<div class='dialog-footer'><div class='pull-right'>";
13.    html += "<button type='button' id='generic-edit-update' class='btn btn-default k-button' data-role='button' role='button' aria-disabled='false'>Update</button>";
14.    html += "<button type='button' id='generic-edit-cancel' class='btn btn-default k-button' data-role='button' role='button' aria-disabled='false'>Cancel</button>";
15.    $("#generic-edit-dialog").html(html);
16. 
17.    $.post(url, JSON.stringify(model))
18.      .done(function (data) {
19.          $("#generic-edit-dialog-content").html(data);
20. 
21.          //Put in every element in the window data-bind="value:INPUT NAME"
22.          //<input name="price" /> become <input name="price" data-bind="value: price" />
23.          $("#generic-edit-dialog-content [name]").each(function () {
24.              var name = $(this).attr("name")
25.              $(this).attr("data-bind", "value:" + name);
26.          });
27. 
28.          kendo.bind($("#generic-edit-dialog-content"), model);
29. 
30.          var win = $("#generic-edit-dialog").kendoWindow({
31.              width: width,
32.              title: title,
33.              modal: true,
34.              visible: false,
35.              actions: [
36.                  "Close"
37.              ],
38.              close: function () { this.destroy; }
39.          }).data("kendoWindow");
40. 
41.          $("#generic-edit-update").click(function () {
42.              grid.saveRow();
43.              win.close();
44.          });
45. 
46.          $("#generic-edit-cancel").click(function () {
47.              grid.cancelRow();
48.              win.close();
49.          });
50. 
51.          win.center().open();
52.      })
53.      .fail(function (jqXHR, textStatus, errorThrown) {
54.          alert("error: " + errorThrown);
55.      });
56. 
57.}

 

Stepping through the code, it seems that some things are missing which prevent saveRow() and cancelRow() from behaving as expected. In particular, there are references to grid._editContainer and grid.editable which are undefined in my case.

Is there anything to be done to salvage this?

 

 

 

Boyan Dimitrov
Telerik team
 answered on 10 Apr 2019
1 answer
269 views

Hello,

Is there any way to add javascript function in tempplate.I have made one example but it didn't work.

https://dojo.telerik.com/ATEWEmuz/82

Martin
Telerik team
 answered on 09 Apr 2019
1 answer
988 views
Is there a way to get the selected Item in a dropdowntree when using checkboxes? the select method does not work when checkboxes are enabled. The change function returns all the values selected, and what I'm exactly looking for is to run some code on the select of the Item. Also, how can I disable children?
Martin
Telerik team
 answered on 08 Apr 2019
2 answers
308 views

Hello,

my Problem is one of the Stacked Barchart Labels is covered by the edge from the plot Area. The other elements are in the correct position. (Image: LabelPosition.png) For the Labels with the correct position i have found this Path (Path.png) and for that other guy (CoveredPath.png) 

Tsvetina
Telerik team
 answered on 08 Apr 2019
1 answer
273 views
I have detail grid for every row in the master grid, all expanded detail grids will be destoryed when add a new record, how to prevent refreshing entire grid when add a new record in the master grid.
Tsvetomir
Telerik team
 answered on 08 Apr 2019
2 answers
160 views

Hello,

I need to change the header format in week view

I found that is hardcoded, but it diffrent for localizations

DATA_HEADER_TEMPLATE = kendo.template('<span class=\'k-link k-nav-day\'>#=kendo.toString(date, \'ddd M/dd\')#</span>')

nobody understand that first digit is it a month

Alexander
Top achievements
Rank 1
 answered on 08 Apr 2019
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?