Telerik Forums
Kendo UI for jQuery Forum
1 answer
425 views
I have a Kendo Grid that works fine if I use the built in popup editor, .Editable(editable => editable.Mode(GridEditMode.PopUp))                

If I switch to a custom template it won't bind the data. 

Any help is appreciated.

@(Html.Kendo().Grid<Application.Models.OrgHtmlContentViewModel>()
    .Name("ContentGrid")
    .Columns(columns =>
    {
        columns.Bound(c => c.OrgHtmlContentTypeName).Width(150).Title("Content Type");
        columns.Bound(c => c.HtmlContent).Width(600).Title("Html Content").Encoded(false);
        columns.Command(command => { command.Edit(); }).Width(100);
    })
    .HtmlAttributes(new { style = "height: 600px;" })
    .Scrollable()
    .Sortable()
    //.Editable(editable => editable.Mode(GridEditMode.PopUp))
    .Editable(editable => { editable.Mode(GridEditMode.PopUp); editable.TemplateName("OrgHtmlContentEditor").Window(w => w.Title("Org Html Content").Width(760)); })           
    .DataSource(dataSource => dataSource
        .Ajax()
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(c => c.OrgHtmlContentId))
        .Read(read => read.Action("OrgHtmlContent_Read", "OrgHtmlContents", new { id = Model.OrganizationId }))
        .Update(update => update.Action("OrgHtmlContent_Update", "OrgHtmlContents"))
    )
)

Custom Editor
@model Application.Models.OrgHtmlContentViewModel
 
<div style="padding: 10px;">
   <h6>@Html.DisplayFor(m => m.OrgHtmlContentTypeName)</h6>
 
    @(Html.Kendo().EditorFor(c => c.HtmlContent)
          .Name("contentEditor")
          .HtmlAttributes(new { style = "width: 740px;height:440px" })
    )
</div>

Alexander Popov
Telerik team
 answered on 02 Oct 2014
1 answer
135 views
Hi team,

We are using Kendo UI Complete v2013.1.514  and now we have to support IE 11. While testing the app we have descovered that we cant select a node in the kendoListView. It works correctly in IE 9 and 10 but not in 11. I know that if we update the Kendo version that problem will be resolved. But, we are to close to release to update. We need a quick fix for that. So my question is if we can overwrite the select handling in that particular js file (kendo.listview) to handle IE 11

Thanks

Kiril Nikolov
Telerik team
 answered on 02 Oct 2014
1 answer
205 views
I am getting an error when i try to refresh the data source of my grid.

Here is the code...

 $(function () {
        setInterval(function () {
               
                $('#eventLog').data('kendoGrid').dataSource.page(1);
                $('#eventLog').data('kendoGrid').dataSource.read();

           

        },
        60000);
    });

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'dataSource': object is null or undefined

The grid code is this...


@(Html.Kendo().Grid(Model.DailyLogEventList)
                  .Name("dailyLogGrid")
                  .HtmlAttributes(new { style = "height: 250px" })
                      .Events(events => events.DataBound("dataBound"))
                      .DataSource(dataSource => dataSource
                          .Ajax()
                          .ServerOperation(false)
                          .PageSize(8)
                          .Read(read => read.Action("DailyLogList_Read", "DailyLog")))
                  .Columns(columns =>
                  {
                      columns.Bound(x => x.IncidentAttached)
                          .ClientTemplate("<a href='" + Url.Action("index", "IncidentReport", new { area = "DailyLog", logId = "#=LogId#'>" }) + "#= IncidentAttached ? '<img src=\"/Images/icon_edit.gif\" />' : '' #" + "</a>")
                          .Width(10)
                          .Title("")
                          .Filterable(false);
                      columns.Bound(p => p.Status).ClientTemplate("# if(Status === 'OPEN') { #" +
                        "<img src='/images/open.png' />" +
                        "# } else if(Status === 'CLOSED'){ #" +
                        "<img src='/images/closed.png' />" +
                        "# } else { #" +
                        "<img src='/images/10days.png' />" +
                        "# } #")
                        .Width(10)
                        .Title("")
                        .Filterable(false);
                      columns.Bound(x => x.LogId).Width(25).Title("Id");
                      columns.Bound(x => x.StartDate).Title("Started").Format("{0:MM/dd/yyyy HH:mm}").Width(40).Sortable(true);
                      columns.Bound(x => x.EventDescription).Title("Event").Width(60).Filterable(filterable => filterable.UI("eventDescFilter"));
                      columns.Bound(x => x.Comments).Title("Comments").Width(63);
                      columns.Bound(x => x.RespondingOfficers).Title("Officer(s)").Width(70);
                      columns.Command(command => command.Custom("Edit").Click("loadDataForEdit")).Width(20);
                  })
                  .Pageable()
                  .Selectable(s => s.Mode(GridSelectionMode.Single))
                  .Filterable()
                  .Scrollable()
)
Kiril Nikolov
Telerik team
 answered on 02 Oct 2014
3 answers
81 views
I expect the parent item render - (in checkbox) if one of sub-items is checked. But it doesn't, when the parent expanded is set to false. When you expand the parent it correctly renders the - sign.
demo
images is without - sign until you expand it
Matjaz
Top achievements
Rank 1
 answered on 01 Oct 2014
2 answers
128 views
Hello,

I have a grid with a drop-down, which is populating properly only as long as I hard-code the values for the drop down in a local array.  If I load the data from a server, the drop down does not bind properly.  Here is a simple plunker to illustrate:
http://plnkr.co/edit/DWaaHGVAS6YuDcqTXPL8

I load the categories (the data source for the drop down) via setTimeout to "simulate" an async ajax call:
var categories = [];
   
  setTimeout(function() {
      categories = [{
          "value": 1,
          "text": "Beverages"
      },{
          "value": 2,
          "text": "Condiments"
      },{
          "value": 3,
          "text": "Confections"
      }];
    $('#grid').data('kendoGrid').dataSource.read();
    $('#grid').data('kendoGrid').refresh();
  }, 100);

As you can see in the plunker, the category field shows the value instead of the text, and the drop down does not work.  

If you simply remove the setTimeout and just populate the categories directly, everything works fine.

How can I make it work without having to hard-code the values?

Also, it appears the names "value" and "text" are required.  Can this be set, so that other names can be used for these properties?

Thanks,
Lars

Lars
Top achievements
Rank 1
 answered on 01 Oct 2014
5 answers
385 views
Hello,

Is there any possibility to avoid text overflow in a shape?

Maybe by showing a ellipsis or dynamically resizing the shape by it's content size?

Sample: http://dojo.telerik.com/@Holger/utIYE/3

Thanks,
Holger
Holger
Top achievements
Rank 1
 answered on 01 Oct 2014
3 answers
262 views
I'm currently facing 2 scenarios, both don't work.

Either I have [object object] when the grid is read, when I click the input field and type in something, the autocomplete fills correctly and when I leave the field, the value is correctly displayed.
Or I have the grid correctly ready, with the value displaying in the field, I click in the input field and type in something, autocomplete fills correctly when I select an entry it gets inserted correctly, but when I leave the field, it turns into "undefined".
Mostly what I changed is the display template. I currently do not know to what values/properties the autocomplete binds so that I can adjust the template correctly.
The field the autocomplete runs on is actually of type object so I want the properties of that object filled correctly and displayed correctly.

In general, how do I debug an autocomplete widget because I cannot make any breakpoints at any point to check the data.
Abdul
Top achievements
Rank 1
 answered on 01 Oct 2014
1 answer
141 views
See: http://plnkr.co/edit/gPYpA6CppqEaLR8MliQ2?p=preview

The id of the attendees are integers but when you look at the console output you see that the integer has actually been converted to a string. 

Is this intentional or an error? Is there a way around this? 

Thanks,
Zohar
Georgi Krustev
Telerik team
 answered on 01 Oct 2014
1 answer
116 views
When autobind is set to true and the data source has null data the drop down defaults to displaying list item 0 as selected and sets the value for the model to null. 

This should not be the case! Instead it should not display any item as selected. It doesn't make sense that what the user sees and the value of the model are different. 

Is there a way around this? 
Georgi Krustev
Telerik team
 answered on 01 Oct 2014
11 answers
1.4K+ views
Hi,
I want to show just one notification at once, if two notifications have to be showed, I hide the first one. To achieve it I hide the first one with the method hide() and it works, but then I was debugging my work and I saw the next problem:

When a new notification is showed, kendo creates the next div element as the last child of body:

<div class="k-animation-container _4215aa70-5cf9-4c47-97b9-fcdda2a56216" style="width:415px; height: 31px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 0px; overflow: visible; display: block; position: fixed; top: 321px; z-index: 10002; left: 475px;">
<div class="k-widget k-notification k-notification-error k-popup k-group k-reset k-state-border-up" data-role="alert" style="display:none; font-size: 10.6667px; fontfamily: tahoma; font-stretch: normal; font-style: normal; font-weight: 400; line-height: 14px; position: absolute; opacity: 1;">
<div class="k-notification-wrap">
<span class="k-icon k-i-note">error</span>
Notification text
<span class="k-icon k-i-close">Hide</span></div></div></div>


also add a class () to the body. When the notification fades out, both the div and the class dissapear. When a new notification is showed when the previous one is still on screen, the first one dissapear and the second one shows up as I want, but the first div element don't dissapear and last still when the last one dissapear.

I want to remove properly all the divs for animations when the last notification fades out.

Thanks.

Fernando
Top achievements
Rank 1
 answered on 01 Oct 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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?