Telerik Forums
Kendo UI for jQuery Forum
1 answer
159 views
I have an angular template with the following notification:

<div kendo-notification="saveNotification">
</div>

In the controller when the save button is clicked I have:

$scope.saveNotification.show("Hello", "World");

which works.  However, when I try and access the control via the ControllerAs syntax:

var vm = this;
vm.saveNotification.show();

I get the error "Cannot read property "show" of undefined".

Can you tell me what I am doing wrong?





Mihai
Telerik team
 answered on 09 Sep 2014
5 answers
278 views
 Yo! I'm aware of the problem with the demo where the markers don't really move at all. I've updated to your latest internal build 2014.2.716

I had this problem with the last build too: basically markers are in pretty much the correct place (and exactly correct a certain zoom level), but if I zoom in, they shift south, and if I zoom out, they shift north.

Here's what my code looks like:

01.$("#localMap").kendoMap({
02.    center: [lat, lng],
03.    zoom: 10,
04.    controls: {
05.        zoom: true
06.    },
07.    layerDefaults: {
08.        marker: {
09.            opacity: 0.75
10.        }
11.    },
12.    zoomEnd: function() {
13.        $("#localMap").data("kendoMap").center();
14.    },
15. 
16.    layers: [
17.       {
18.        type: "bing",
19.        imagerySet: "road",
20.        key: "xxx"
21.        },
22. 
23. 
24.        {
25.            type: "marker",
26.            tooltip: {
27.                template: "#= marker.dataItem.name #"
28.            },
29.            shape: 'restaurant',
30.            dataSource: {
31.                data: App.restaurantVenueArray
32.            },
33.            locationField: "latlng",
34.            titleField: "name"
35.        },
36.        {
37.            type: "marker",
38.            tooltip: {
39.                template: "#= marker.dataItem.name # </br> #= marker.dataItem.phone # "
40.            },
41.            shape: 'winery',
42.            dataSource: {
43.                data: App.retailVenueArray
44.            },
45.            locationField: "latlng",
46.            titleField: "name"
47.        }
48.    ],
49.    markers: [
50.        {
51.            location: [lat, lng],
52.            shape: "here",
53.            tooltip: {
54.                content: "Current Location"
55.            }
56.        }
57.    ]
58.});
T. Tsonev
Telerik team
 answered on 09 Sep 2014
3 answers
670 views
Hi, I want to get the id of the checkbox the user clicks on, but it doesn't seem like it's working.  Thank you all in advance.

@(Html.Kendo().TreeView()
    .Name("treeview")
    .HtmlAttributes(new {@class="demo-section" })
    .Checkboxes(checkboxes => checkboxes
        .Name("checkedGuide")
        .CheckChildren(true)
    )
    .DataTextField("Name")
    .DataSource(dataSource => dataSource
        .Read(read => read
            .Action("GetTree", "AuthService")
        )
    )
)

<script>

    $("#treeview").on("change", ":checkbox", function (e) {
        var data = $("#treeview").data('kendoTreeView').dataItem(e.node);
        alert(data.id);
    });

</script>
Alex Gyoshev
Telerik team
 answered on 09 Sep 2014
1 answer
54 views
For moblile I need to have a Settings Screen for users to enter an API key or toggle some slider options.

...just very lost as to where to go or what to do?

Steve
Kiril Nikolov
Telerik team
 answered on 09 Sep 2014
1 answer
102 views
I know that many topics discuss this subject. I read them approximately 15, so please bear with me. I also follow the documentation and it works.
Then I add a new kendo widget to the window and 100% height is collapsed.

How can I achieve that kendoGrid takes all available space not the whole space?

demo I want only grid scroll not also window.
Dimo
Telerik team
 answered on 09 Sep 2014
2 answers
211 views
Hi,

as upgrading from the open source core version 2014.1.318 to the new version of 2014.2.716, we encountered a small problem with the css.
Using "display: flex;" on the container DIV, the input inside it changed to a 2 row high field after calling ".kendoNumericTextBox()".

CSS:
#container{float: left; display: flex;}

HTML:
<div id="container">
   <
input id='numBox' type='number' class='' value='0'/>
 </
div>


JS:
$("#numBox").kendoNumericTextBox({
  decimals: 1,
  format: "#",
  max: null,
  min: null,
  onChange: function(e) {
    console.log(e);
  },
  spinners: true,
  step: 1
});

As you can see here: http://jsbin.com/yiwusumujino/1/edit

To solve this problem this CSS code should be added:
.k-numeric-wrap { display: flex;}

This shouldn't be handled inside Kendo UI?

Thanks,
Norbert
Iliana Dyankova
Telerik team
 answered on 09 Sep 2014
6 answers
177 views
We are experience significant performance issues when loading and editing our Kendo UI grid when the grid has approximately 100 rows and 40 columns.

We so not see this problem when the grid only loads a few rows with 10 columns.

The loading, editing, add new rows, saving, and refreshing are all unacceptably slow in IE 10, in compatibility mode, while Firefox (24.7.0) does not have these issues.

Do you have any ideas as to how we can deal with this issue or why we are getting it?

Thanks,

Bradley
Kiril Nikolov
Telerik team
 answered on 09 Sep 2014
10 answers
399 views
I've almost used up my trial time trying to figure out how to get a dropdownlist to show up like the example in:
http://demos.kendoui.com/web/grid/editing-custom.html

I see I'm not the only one struggling to get something that should be pretty simple to work.  The example is missing an explanation of how the template #=Category.CategoryName# works and where to find the definition of that template.  I'd like the see a step-by-step tutorial on how to wire up this control.  I'm sure there are MANY others who would benefit from this as well.

In my demo application I have a database value I'm reading which is an integer which I want displayed as a text in a DropDownList within a grid.  I think I'm close but I'm missing a few key points.  How do I add my own editor template?  The demo seems to suggest it is either in the view or controller for the grid.  I think I found it in the "EditorTemplates" folder but have no idea how it gets connected to the view.  Here are snippets of my project code:

My view:
@model IEnumerable<QT_Kendo2.Models.Isotope>
@{
    ViewBag.Title = "Index";
}
<h2>Isotope Library</h2>
@(Html.Kendo().Grid(Model).Name("Isotopes").Columns(c =>
{
    c.Bound(p => p.Id).Hidden();
    c.Bound(p => p.Version).Hidden();
    c.Bound(p => p.Name);
    c.Bound(p => p.LLD).Format("{0:n1}");
    c.Bound(p => p.ULD).Format("{0:n1}");
    c.Bound(p => p.HalfLife);
    c.Bound(p => p.HalfLife_Units).ClientTemplate("#=HLUnitList#");     // Convert the numeric index into text (hours, days, weeks, years)

    c.Command(command => { command.Edit(); command.Destroy(); });
})
    .ToolBar(toolbar =>
        {
            toolbar.Create();
            //    toolbar.Save();       // Used in batch mode
        })
    //.HtmlAttributes(new { style = "height:400px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
        .Model(model =>
            {
            model.Id(p => p.Id);
            model.Field(p => p.Id).Editable(false);
            })
        .Create(create => create.Action("EditingIsotope_Create", "Isotope"))       // "Insert"
        .Update(update => update.Action("EditingIsotope_Update", "Isotope"))
        .Destroy(destroy => destroy.Action("EditingIsotope_Destroy", "Isotope"))
        .Events(events => events.Error("error_handler"))
     )
    .Pageable()
    .Sortable()
    .Editable(editable => editable.Mode(GridEditMode.InLine))
)
Controller:
namespace QT_Kendo2.Controllers
{
    public class IsotopeController : Controller
    {
        private QT_Db db = new QT_Db();

        public ActionResult Index()
        {
            var hlUnits = new List<string>() {"hours", "days", "weeks", "years"};
            ViewData["hlUnits"] = hlUnits;
            return View(db.Isotopes.ToList());
        }

        public ActionResult EditingCustom_Read([DataSourceRequest] DataSourceRequest request)
        {
            var dsr = new DataSourceResult();
            return Json(dsr);
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult EditingIsotope_Update([DataSourceRequest] DataSourceRequest request, Isotope isotope)
        {
            if (isotope != null && ModelState.IsValid)
            {
                db.Entry(isotope).State = EntityState.Modified;
                db.SaveChanges();
            }
            return Json(ModelState.ToDataSourceResult());
        }

    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditingIsotope_Destroy([DataSourceRequest] DataSourceRequest request, Isotope isotope)
        {
            db.Isotopes.Remove(db.Isotopes.Find(isotope.Id));
            db.SaveChanges();
            return Json(ModelState.ToDataSourceResult());
        }

    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditingIsotope_Create([DataSourceRequest] DataSourceRequest request, Isotope isotope)
        {
            if (ModelState.IsValid)
            {
                db.Isotopes.Add(isotope);
                db.SaveChanges();
            }
            return Json(ModelState.ToDataSourceResult());
        }

EditorTemplates as seen in the demo.  Not sure how to add these to my project.  Just adding as a partial view doesn't work.
@model IEnumerable<QT_Kendo2.Models.Isotope>
@(Html.Kendo().DropDownListFor(m => m)
        .Name("HLUnitList")                                       // Name used by template?  #= HLUnitList
        .DataValueField("HalfLife_Units")               // Name of the index from the model
        .DataTextField("HLUnitList")                        // Name of the template again.
        .BindTo((System.Collections.IEnumerable)ViewData["hlUnits"])      // Bind to the list index to the string list
)

Vladimir Iliev
Telerik team
 answered on 09 Sep 2014
4 answers
654 views
How can I expand all?

I thought I saw some code in this demo to do it, but firebug keeps returning "undefined"

var menucontainer = $("#menu");
 
menucontainer.insertBefore($("#content-wrapper")); //Move the menu
menucontainer.kendoPanelBar(); //Kendo the Menu
 
menucontainer.data("kendoPanelBar").expand($("#menu .k-link"), true);
Masaab
Top achievements
Rank 1
 answered on 09 Sep 2014
2 answers
149 views
Sorry if this isn't the appropriate forum.  I have several elements interacting here as you will see...

Imagine a page with a simple search form and a grid containing the results of the search.  The grid is hidden by default and only shown when needed.

I have a menu that is hidden at the top of the page.  The menu is slid in using kendo.fx().slideIn() when the user clicks a handle (similar to the SlideIn demo, but from the top).  This works perfectly until the search grid is shown.

Once the search grid is shown, it covers up the menu when the menu is also shown (see attached coveredMenu.png).  I've also attached some of the relevant HTML (see attached coveredMenuHtml.png).

Through experimentation, I've determined the following:
  • IE11 and Firefox both exhibit the same behavior.  Haven't tested other browsers.
  • If the menu is not slid in, everything works fine.
  • By playing with paddings, I can see that the element causing the problem is the <div class="k-grid k-widget"> gird container.
  • Playing with z-indexes for the grid and menu makes no difference in this behavior.

So how can I accomplish sliding the menu in without it being covered?

Steve
Top achievements
Rank 1
 answered on 08 Sep 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
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?