Telerik Forums
Kendo UI for jQuery Forum
1 answer
224 views

Hello,

I have a grid where I am changing the sort in javascript when a certain action is performed.

The grid is paged, and when the sort occurs, it stays on the same page. I want the pager to reset (back to page 1).

This could be accomplished by:

var grid = $("#grid").data("kendoGrid");
grid.dataSource.sort({ field: "Name", dir: "asc" });
grid.dataSource.page(1);

However - both the sort and page methods cause the grid to refresh. (Read)  Is there a way to avoid the multiple refreshes?  i.e. Set the sort without refreshing the grid, then calling page(1) to refresh the grid?

Eduardo Serra
Telerik team
 answered on 09 Feb 2017
2 answers
239 views

How to reduce the height of the top title row in kendo grid?  I tried but failed.

.k-grid-header .k-header {height:1em!important; line-height:1em!important;}

I already reduce the row height by css successfully.  But how to apply to title row?

.k-grid td {
line-height:1.3em!important;
}

Thanks.

Kent
Top achievements
Rank 1
 answered on 09 Feb 2017
3 answers
516 views

A have a chart and a grid with ~100 lines, then another chart with a grid with ~100 lines on a bootstrap built page with an export to PDF button on it. I can press the button and it will export all of the data to a single page. When it comes to printing the PDF the content is so small it's unreadable. This is the javascript to do that:

    // Convert the DOM element to a drawing using kendo.drawing.drawDOM
                    kendo.drawing.drawDOM($(".content-wrapper"))
                    .then(function (group) {
                        // Render the result as a PDF file
                        return kendo.drawing.exportPDF(group, {
                            paperSize: "auto",
                            margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }
                        });
                    })
                    .done(function (data) {
                        // Save the PDF file
                        kendo.saveAs({
                            dataURI: data,
                            fileName: filename + ".pdf",
                            proxyURL: "//"
                        });
                    });

In both the drawDOM and exportPDF sections I have tried to set the page size to "A4" and multipage enabled, with and without page breaks but it never seems to scale the page properly and sometimes the charts just don't render at all.

The page is in sections and so could be split over multiple pages with a page break class.

What do I need to do to have the PDF page break correctly whilst staying at the correct scale?

Gary
Top achievements
Rank 1
 answered on 09 Feb 2017
6 answers
450 views

I tried the sample on http://docs.telerik.com/kendo-ui/third-party/using-kendo-with-requirejs

But it is loading kendo.all which defeats the purpose of just loading individual scripts

Stefan
Telerik team
 answered on 09 Feb 2017
1 answer
316 views

Here's the situation I am currently facing.  I am working with a cloud web application that allows me to provide a javascript file that, using jQuery, allows me to do customize the UI.  However, the application does not allow me to directly add any javascript / css to the head of each page.  What I am trying to do is use jQuery to add the Kendo UI library and css, so that I can then use Kendo to do some custom UI in the web application.

So in my javascript file, I have the following lines at the very top, so that Kendo is loaded as soon as possible:

$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', 'https://kendo.cdn.telerik.com/2017.1.118/styles/kendo.common.min.css'));
$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', 'https://kendo.cdn.telerik.com/2017.1.118/styles/kendo.default.min.css'));
$.getScript('https://kendo.cdn.telerik.com/2017.1.118/js/kendo.all.min.js');

If I look at the sources for the page, after the script runs, the Kendo UI components do appear.  However, when I then try to use a component, for instance the Kendo Menu (by calling $('#menu').kendoMenu();), I get "Uncaught TypeError: $(..).kendoMenu is not a function".  Any ideas on what I'm missing, or how I can fix this problem?

Thanks,

Mike

Veselin Tsvetanov
Telerik team
 answered on 09 Feb 2017
1 answer
2.4K+ views

I'm getting the following error when trying to call the method .saveAsExcel(): "Unable to get property 'length' of undefined or null reference"

Here is code:

$(".download-excel").on("click",
    function() {
        try {
            var grid = $("#DataGrid").data("kendoGrid");
            grid.saveAsExcel();
        } catch (e) {
            fnDialog('Error Exporting Excel',
                'There was an error exporting the excel document. Please contact customer service.',
                null,
                null);
        }
    });

 

If I set a watch on the grid object, I can see the data. For some reason it fails at the grid.saveAsExcel();

Stefan
Telerik team
 answered on 09 Feb 2017
2 answers
1.1K+ views

Hi.

I manged to enable horizontal scrolling as shown here. But exporting it to PDF shrinks the widths back to standard. Even if I use scaling and A3 landscape as paper size.

This is a sample dojo showing the effect. There is plenty of unsed space on the right side.

How can I create a PDF showing one page per group and use the available page size?

Your example doesn't help me much, because the result is quite ugly (the next day is intended) and it doesn't page per group/day.

Kind regards

Bernd

Bernd
Top achievements
Rank 2
 answered on 09 Feb 2017
3 answers
140 views

Hi,

When I try to center a diagram using the BringIntoView method, the undo after centering the diagram is causing a bad behavior.

Here is a link for a demo that replicate the issue: http://dojo.telerik.com/esAVu

Replication steps:

1- Change the diagram position

2- Click on the Center button

3- Click the Undo button and check the behavior

The expected behavior is that the diagram will return to the old position before centering, instead it returns to completely random position.

Is this a bug in kendo diagram ? if yes, is there a consideration to fix it ?

 

Boyan Dimitrov
Telerik team
 answered on 09 Feb 2017
1 answer
108 views

I am getting a very weird problem only on Edge:

1. Open the following site on Edge: http://dojo.telerik.com/emONo/2

2. clear the first cell "Jane Doe" and click enter

3. Click on the same cell. You will not be able to edit it unless you double click on it

Alex Hajigeorgieva
Telerik team
 answered on 09 Feb 2017
2 answers
112 views
Using the trial and exploring options - does utilizing a signalr data source support grid server-side grouping (serverGrouping = true), possibly using DataSourceRequest?
Christopher
Top achievements
Rank 2
Iron
 answered on 08 Feb 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?