Telerik Forums
Kendo UI for jQuery Forum
3 answers
66 views

Hi,

We are using Kendo UI Menu in our SPA solution and we are getting some strange behavior from the Menu component. The menu is configured to expand and show all items when the mouse-over event is fired.The items are added based on an API call and contains all the projects users of the solution has access to. If a user changes project and then click on the menu before the menu is able to expand, and while the menu is still selected from the previous project change, the text from all items in the menu is appended and shown as the selected item.

This only happens in IE11 and Edge, if I try to set IE11 to behave as IE10 the issue goes away. Chrome works just fine. If I run this in the dev env. I am able to get the same "chain of events" in Chrome if I just browser sync and use IE for interaction. 

When debugging I can see that the select event for the menu is supplied with an  "e" object where the "e.item.textContent" property is set to the text from all the items in the datasource.

Have you encountered this before?

Ivan Danchev
Telerik team
 answered on 21 Apr 2017
2 answers
373 views

The column headers are displaying but no data from the JSON file I used in my source.

<div id="example">
           <div id="grid"></div>
           <script>
               $(document).ready(function() {
                   $("#grid").kendoGrid({
                       dataSource: {
                           type: "json",
                           serverPaging: true,
                           serverSorting: true,
                           pageSize: 100,
                           transport: {
                               read: "http://localhost/Temp/examples/grid/data.json",
                           }
                       },
                       height: 543,
                       scrollable: {
                           virtual: true
                       },
                       sortable: true,
                       columns: [
                           { field: "FirstName", title: "First Name", width: 100 },
                           { field: "LastName", title: "Last Name", width: 100},
                           { field: "Email", title: "Email", width: 50 },
                           { field: "Desk", title: "Desk", width: 50 },
                           { field: "Mobile", title: "Mobile", width: 50 },
                           { field: "Location", title: "Location", width: 110 }
                       ]
                   });
               });
           </script>
           <style>
 
               /*horizontal Grid scrollbar should appear if the browser window is shrinked too much*/
               #grid table
               {
                   min-width: 1190px;
               }
 
           </style>
       </div>

 

Maybe the JSON fine isn't properly formatted?

 

Stefan
Telerik team
 answered on 21 Apr 2017
4 answers
534 views

Hello,

I'm using the following code to export a grid with a few hundred rows:

kendo.drawing.drawDOM($("#resultsGrid"),
    {
        allPages: true,
        avoidLinks: true,
        paperSize: "A4",
        multiPage: true,
        landscape: true,
        margin: { top: "4cm", right: "1cm", bottom: "1cm", left: "1cm" },
        repeatHeaders: true
    }).then(function (documentgroup)
    {
        kendo.drawing.pdf.saveAs(documentgroup, "myfile", "pdf"));
    });

 

The pdf settings on the grid look like this:

pdf: {
    allPages: true,
    repeatHeaders: true
},

 

The grid exports fine but does not repeat the headers on each page.  They are only present on the first page.  Any ideas what would prevent "repeatHeaders: true" from repeating the headers on every page of the exported PDF file?

Thanks,

Jonesy

Stefan
Telerik team
 answered on 21 Apr 2017
1 answer
192 views
Nested Non-Content Editable is removed when pressing "Enter" Key on any content editable.
Try the snippet below on Telerik Demos.
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <div id="example">
        <div id="editor" rows="10" cols="30" style="height:400px">
            <br />
            <br />
            <p contenteditable="false"><span contenteditable="false">THIS WILL BE REMOVED ( NESTED CONTENT EDITABLE=FALSE)</span></p>
            <p>If you press Enter key when focus on this text the above will be removed.</p>
        </div>
        <script>
            $(document).ready(function() {
                $("#editor").kendoEditor({
                    immutables: true,
                    tools: ["viewHtml"]
                });
            });
       </script>
   </div>
</body>
</html>
Veselin Tsvetanov
Telerik team
 answered on 21 Apr 2017
9 answers
1.2K+ views
I have a nice grid set up your using batch edit demo as an example. However, I would now like to add filtering like in your 'Custom Toolbar' demo. Is there as nice way to still keep the three batch edit buttons and add my own filtering dropdown to the toolbar, or do I now have to code my own add/save/cancel UI for my custom toolbar?

I don't wan't to use the built in filtering because I don't want to have to include the column I filter on as a grid column.

SOLUTION SO FAR:
I have achieved much of what I want by 'manually' moving my filter elements into the grid toolbar, like below:

<style>
    #filter-toolbar
    {
        display: inline-block;
        padding: 5px;
    }
</style>
<script>
    $("#department-grid .k-grid-toolbar").prepend($("#filter-toolbar"));
</script>
<div id="department-grid"></div>
<
div id="filter-toolbar">
    <label>Company: </label>
    @Html.DropDownList("CompanyId", Model.CompanySelectList)
</div>
<div id="department-grid"></div>
Stefan
Telerik team
 answered on 21 Apr 2017
3 answers
498 views
i am working with the web "grid popup editing" and i need to change de tittle of the 
poopup... i need some help... how can i modidy the tittle/label of the popup "edit"?
thanks.



Joseph
Top achievements
Rank 1
 answered on 20 Apr 2017
5 answers
2.1K+ views

Hello,

I am trying to implement a complex grid that has 4 functions defined, on dataBound, columnMenuInit, and 2 on change. We noticed that, when using setOptions/getOptions from local storage, the functionality of our column menu is lost (an error about t[e] not being defined pops up).

Now, I have researched and apparently the JSON.stringify we have to apply before storing does away with the functions, this is, they are lost when setting the options to local storage: however, I was trying to implement a workaround I saw while researching, where basically the function was stored separately, and added after parsing the rest of the options before loading them to the grid again.

My problem now is that the function is getting added to the parsed options object as what I believe is an Unicode string (the representation of it on Chrome dev tools comes up as a string instead of a function). The error thrown when trying to JSON.parse it is that there's a "u" token at position 1, so that's what leads me to think in this way.

My question is: is there any way I can assign the function stored separately on local storage to grid options before applying them to the grid, in order to not lose any functionality? I would be happy just storing and re-adding the columnMenu function (I guess I could extend this to the other ones if it's possible, later on). What would be your advice in this case?

Thank you!

Infraestructura TI
Top achievements
Rank 1
 answered on 20 Apr 2017
1 answer
980 views

The className specified is applied on A tag but not on the right inner SPAN tag

try this code on dojo , see the attached screenshot

<!DOCTYPE html>
<html>
<head>
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
 
</head>
<body>
        <script src="../content/shared/js/people.js"></script>
 
        <div id="example">
            <div id="grid"></div>
 
            <div id="details"></div>
 
            <script>
                var wnd,
                    detailsTemplate;
 
                $(document).ready(function () {
                    var grid = $("#grid").kendoGrid({
                        dataSource: {
                           pageSize: 20,
                           data: createRandomData(50)
                        },
                        pageable: true,
                        height: 550,
                        columns: [
                            { field: "FirstName", title: "First Name", width: "140px" },
                            { field: "LastName", title: "Last Name", width: "140px" },
                            { field: "Title" },
                            { command: { text: "View Details", click: showDetails, className : 'k-icon k-i-copy' }, title: " ", width: "180px" }]
                    }).data("kendoGrid");
 
                    wnd = $("#details")
                        .kendoWindow({
                            title: "Customer Details",
                            modal: true,
                            visible: false,
                            resizable: false,
                            width: 300
                        }).data("kendoWindow");
 
                    detailsTemplate = kendo.template($("#template").html());
                });
 
                function showDetails(e) {
                    e.preventDefault();
 
                    var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
                    wnd.content(detailsTemplate(dataItem));
                    wnd.center().open();
                }
            </script>
 
            <script type="text/x-kendo-template" id="template">
                <div id="details-container">
                    <h2>#= FirstName # #= LastName #</h2>
                    <em>#= Title #</em>
                    <dl>
                        <dt>City: #= City #</dt>
                        <dt>Birth Date: #= kendo.toString(BirthDate, "MM/dd/yyyy") #</dt>
                    </dl>
                </div>
            </script>
 
            <style type="text/css">
                #details-container
                {
                    padding: 10px;
                }
 
                #details-container h2
                {
                    margin: 0;
                }
 
                #details-container em
                {
                    color: #8c8c8c;
                }
 
                #details-container dt
                {
                    margin:0;
                    display: inline;
                }
            </style>
        </div>
 
 
</body>
</html>

 

Preslav
Telerik team
 answered on 20 Apr 2017
1 answer
2.1K+ views

Hi,

I am developing a MVC Project with kendo ui. One of the requirement is to filter blank values in grid columns. The filter option should be a part of existing filter options present with column headers. How can we implement the same?

Tsvetina
Telerik team
 answered on 20 Apr 2017
1 answer
275 views
I cannot get the DatePicker Popup to sit on the top of the grid, it seems to cut off at the footer. I've tweaked with the CSS to no avail. Has anyone had any luck?
Georgi Krustev
Telerik team
 answered on 20 Apr 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?