Telerik Forums
Kendo UI for jQuery Forum
1 answer
2.5K+ views

Hello, I hope someone can help me out with this problem I am struggling with.

I am attempting to use a multi select as an editor for a column within my grid. This column itself is actually an object which I use a template to display the text content within the grid:

"accountReps": {
            "primary": [{
                "userId": 1234,
                "name": "Person name"
            }],
            "secondary": []
        }

 

These properties are also both set as editable in the schema model

"accountReps.primary": {
    "type": "object",
    "editable": true,
    "nullable": false,
    "validation": {
        "required": false
    }
},
"accountReps.secondary": {
    "type": "object",
    "editable": true,
    "nullable": false,
    "validation": {
        "required": false
    }
}

 

When its comes to the editor I can display the editor and populate the initial values fine, but when persisting back to the grid the data is not to be mapping to my object correctly. The code I am using for the editor is:

 

$('<select name="' + options.field + '"/>')
    .appendTo(container)
    .kendoMultiSelect({
        placeholder: "Select",
        autoBind: false,
        dataTextField: "Name",
        dataValueField: "Id",
        valuePrimitive: true,
        dataSource: ds,
        change: function(e) {
            console.log('change');
        },
        select: function(e) {
            console.log('select');
        },
        dataBound: function () {
            var fieldValues = options.model.get(options.field).map(function (item) {
                return item.userId.toString();
            });
            this.value(fieldValues);
        }
    });

 

I believe its just setting the selected ids as the value for my column. I'm hoping for an event I can use to set the value correctly or a way to map the object.

Any help would be much appreciated.

John

Stefan
Telerik team
 answered on 11 Aug 2017
9 answers
856 views

I have a need to do the following two things with my grid's column filter menu dropdown checkboxes:

1) Sort the checkboxes alphabetically by their value (by default the are sorted by the grid's datasource sort value).

2) Filter all other column's checkbox values based on the filter selection of the first checkbox.

 

I found examples on here which show how to do each of these things, but when combined together I'm noticing that, because the grid and the filter menu share the same datasource, as soon as the filter menu is opened and the checkboxes are sorted/displayed, the entire grid is sorted as well.

 

I've created an example here: http://dojo.telerik.com/@mcook103/oxilA

Stefan
Telerik team
 answered on 11 Aug 2017
2 answers
181 views

Hello Everyone,

I want to apply the group property to only week view and keep it default for day and month. How can I that?

Thanks

Rahul

Veselin Tsvetanov
Telerik team
 answered on 11 Aug 2017
1 answer
2.6K+ views

Hi Teachers

I am using Kendoui in asp.net core for reporting for pdf and excel.Report pdf have problem for motherland language not display in export file .pdf.I am add  pdf export code of index.chtml file look like this

<h2>PDF Report Kendo UI Layout Tutorials</h2>

<style>
    /*
            Use the DejaVu Sans font for display and embedding in the PDF file.
            The standard PDF fonts have no support for Unicode characters.

            The font-face is declared in the Kendo UI stylesheets.
        */
    @@font-face {
        font-family: "MyanmarLanguage";
        src: url("~/Fonts/Zawgyi-One.ttf") format("truetype");    
    }

    .k-grid {
        /*font-family: "DejaVu Sans", "Arial", ''sans-serif'';*/
        font-family: ''MyanmarLanguage'';
   
    }
   
    /* Hide the Grid header and pager during export */
    .k-pdf-export .k-grid-toolbar,
    .k-pdf-export .k-pager-wrap {
        display: none;
    }
</style>


<div class="box wide">
    <p style="margin-bottom: 1em"><b>Important:</b></p>

    <p style="margin-bottom: 1em">
        This page loads
        <a href="https://github.com/nodeca/pako">pako zlib library</a> (pako_deflate.min.js)
        to enable compression in the PDF. This is highly recommended as it improves
        performance and rises the limit on the size of the content that can be exported.
    </p>

    <p>
        The Standard PDF fonts do not include Unicode support.

        In order for the output to match what you see in the browser
        you must provide source files for TrueType fonts for embedding.

        Please read the documentation about
        <a href="http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#custom-fonts-and-pdf">custom fonts</a>
        and
        <a href="http://docs.telerik.com/kendo-ui/framework/drawing/pdf-output#using-custom-fonts">drawing</a>.
    </p>
</div>

<script type="x/kendo-template" id="page-template">
    <div class="page-template">
        <div class="header">
            <div style="float: right">Page #: pageNum # of #: totalPages #</div>
            Multi-page grid with automatic page breaking
        </div>
        <div class="watermark">ပိုင္စိုးသူ</div>
        <div class="footer">
            Page #: pageNum # of #: totalPages #
        </div>
    </div>
</script>

<div>
    @(Html.Kendo().Grid<EPGEKendoUI.Models.TestViewModel>()
        .Name("grid")
        .ToolBar(tools => tools.Pdf())
        .Pdf(pdf => pdf
            .AllPages()
            .AvoidLinks()
            .PaperSize("A4")
            .Margin("2cm", "1cm", "1cm", "1cm")
            .Landscape()
            .RepeatHeaders()
            .TemplateId("page-template")
            .FileName("Kendo UI Grid Export.pdf")
            .ProxyURL(Url.Action("ExcelSave", "Grid"))
        )
        .Columns(columns =>
        {
            columns.Bound(p => p.Name);
            columns.ForeignKey(p => p.GenreId, (System.Collections.IEnumerable)ViewData["genres"], "Id", "Name").Title("Genre");
            columns.ForeignKey(p => p.RatingId, (System.Collections.IEnumerable)ViewData["ratings"], "Id", "Name").Title("Rating");
            columns.ForeignKey(p => p.ShopLocationId, (System.Collections.IEnumerable)ViewData["location"], "Id", "Location").Title("ShopLocation");
        })
        .HtmlAttributes(new { style = "height: 550px;" })
        .Scrollable()
        .Groupable()
        .Sortable()
        .Pageable(pageable => pageable
            .Refresh(true)
            .PageSizes(true)
            .ButtonCount(5))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("ExcelRead", "Excel"))
            .PageSize(20)
        )
    )
</div>

<style>
    /* Page Template for the exported PDF */
    .page-template {
        /*font-family: "DejaVu Sans", "Arial", sans-serif;*/
        font-family : ''MyanmarLanguage'';
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

        .page-template .header {
            position: absolute;
            top: 30px;
            left: 30px;
            right: 30px;
            border-bottom: 1px solid #888;
            color: #888;
        }

        .page-template .footer {
            position: absolute;
            bottom: 30px;
            left: 30px;
            right: 30px;
            border-top: 1px solid #888;
            text-align: center;
            color: #888;
        }

        .page-template .watermark {         
            font-weight: bold;
            font-size: 400%;
            text-align: center;
            margin-top: 30%;
            color: #ff0000;
            opacity: 0.1;
            transform: rotate(-35deg) scale(1.7, 1.5);
        }

    /* Content styling */
    .customer-photo {
        display: inline-block;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-size: 32px 35px;
        background-position: center center;
        vertical-align: middle;
        line-height: 32px;
        box-shadow: inset 0 0 1px #999, inset 0 0 10px rgba(0,0,0,.2);
        margin-left: 5px;
    }

    .customer-name {
        display: inline-block;
        vertical-align: middle;
        line-height: 32px;
        padding-left: 3px;
    }
</style>


Pleas help me and see out put pdf file attached.

 



Stefan
Telerik team
 answered on 11 Aug 2017
3 answers
184 views

Hi,

 

I'm struggling to center my text inside a Diagram box. I followed this example, but it still doesn't work. Here's my code :

 

The diagram

The visualTemplate function

 

 

 

 

 

Stefan
Telerik team
 answered on 11 Aug 2017
2 answers
165 views

I'm not sure if this is a recent issue, or if it's always been there, I'd swear it was working before but maybe I'm mistaken.

If this is a known issue please disregard.

In Excel or Google sheets, if you make a rectangular selection of a range, you can edit a value, hit the TAB key, edit the next value, and the selection within the selection will move within your rectangle, allowing you to edit each cell in the range.

Currently, in the Kendo UI spreadsheet, for some reason, if you enter a value for one cell, it makes that value the value for ALL cells in the selection.

Steps to reproduce:

  1. Jump to one of the spreadsheet demos: http://demos.telerik.com/kendo-ui/spreadsheet/index
  2. Select a rectangular range.
  3. Type in "ABC".
  4. Notice all cells get changed to "ABC".
  5. Hit tab to edit the next cell.
  6. Type in "123"
  7. Notice all cells get changed to "123".

The issue:

Unlike Excel or Google Sheets, and this seems problematic, editing a single cell within a multi-cell range causes all cells to change to that value, rather than allowing individual cell editing via the TAB and ENTER keys.

Christopher
Top achievements
Rank 2
Iron
 answered on 10 Aug 2017
3 answers
3.2K+ views

UPDATE
After two days of googling I found the solution in this example:
http://jsfiddle.net/krustev/9qZnp/ 

I adapted it to my own code, and it works perfectly.

KR

Henk Jelt

END UPDATE

Hi

I have two dropdown lists.
One contains a list of customers. 
The second should contain a list of products for the selected customer.
Both are populated by calls to json-webservices.
The selection process works fine via postback (I cannot get cascading dropdownlists working...).

It works like this:
I select an option in the first dropdownlist, which is part of a form.
Then I invoke a postback, retrieve the value of the selected item in the dropdownlist, and use this to dynamically adapt the json call to retrieve the data for the second dropdownlist.
This works fine: the second dropdownlist is populated ok.

The problem I have is that the selected item in the first dropdownlist gets lost.
I want it to come back but have no clue how.

I am working in an MVC environment, so I save the value in a viewdata-object, which I can re-use in the view.

Which steps do I need to take to have the selected option in view?

KR

Henk Jelt Hoving
Graham
Top achievements
Rank 2
Iron
Iron
 answered on 10 Aug 2017
2 answers
387 views

Cross posting from dropdownlist widget

Both widgets(potentially others) seem to have the same issue in MS Edge. Their popup will appear, then immediately disappear.

Ivan Danchev
Telerik team
 answered on 10 Aug 2017
1 answer
471 views

Cross posting

It looks like combobox has the same issue as the other widgets.

Ivan Danchev
Telerik team
 answered on 10 Aug 2017
14 answers
339 views

I'm using 2017.2.504 version of Kendo UI and I've got some number of errors from the server which are pointing to kendo's code. It happen's when user with next info:

 

"userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; InfoPath.3; rv:11.0) like Gecko", "userAgentInfo": { "browserName": "Internet Explorer", "browserVersion": "11.0", "engineName": "Trident", "engineVersion": "", "isBot": false, "isMobile": false, "os": "Windows 10", "platform": "Windows" }

 

navigates to page with kendo Scheduler control. This is the error message I've got and callstack:

MESSAGE Unable to get property 'end' of undefined or null reference

Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:85697:17 in timeSlotRanges
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87551:21 in _updateCurrentTimeMarker
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87529:17 in _currentTimeMarkerUpdater
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87585:21 in _currentTime
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87526:17 in init
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:42:21 in Anonymous function
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97516:25 in _initializeView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97484:17 in _renderView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97452:21 in _selectView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97474:21 in view

 

Can you help to eliminate this errors?

 

Thanks,


Taras
Top achievements
Rank 2
 answered on 10 Aug 2017
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
ContextMenu
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
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?