Telerik Forums
Kendo UI for jQuery Forum
5 answers
1.0K+ views
I downloaded the ASP MVC and Ajax bits. I am trying to explore the scheduler in a test MVC app but the project can't compile - I'm missing Kendo.Mvc.Examples.Models.Scheduler. Where in the world is that file please? I found a vague reference to a manual installation but the UI has changed since that answer was posted.

Cheers
John
Vessy
Telerik team
 answered on 06 Dec 2016
8 answers
3.1K+ views
Is there a way to completely remove the title bar from a Window?
Thanks.
Marin Bratanov
Telerik team
 answered on 06 Dec 2016
1 answer
445 views

I want to bind dynamic data to a validation list - is there an easy way to do this? The data will be an array of objects, with id/value pairs and in the dropdown list I'd like to show the value, but store the ID.

I'm using (where valueList is an array which I want to be databound) :

 

validation {
   dataType: "list",
   showButton: true,
   comparerType: "list",
   from: valueList,
   allowNulls: true,
   type: "reject"
}

Stefan
Telerik team
 answered on 06 Dec 2016
5 answers
723 views

Hi,

I'm exporting my KendoGrid to PDF with a Template. I need to pass variables to the template like this:

template: kendo.template($("#kendo-grid-pdf-template").html())({ CUSTOMERNAME: cust.FullName, CUSTOMERID: cust.Id})

 

This is the template:

<script id="kendo-grid-pdf-template" type="text/x-kendo-template">
    <div class="page-template-pdf">
        <div class="header-pdf">
            #: CUSTOMERNAME #, Customer ID: #: CUSTOMERID#
        </div>
    </div>
</script>

 

The Problem:

PDF generation fails because "pageNum" and "totalPages" are undefined. This only happens when I pass my custom parameters. How do I pass the pageNum and totalPages parameters that are required? It work when I pass it like this:

template: kendo.template($("#kendo-grid-pdf-template").html())({ CUSTOMERNAME: cust.FullName, CUSTOMERID: cust.Id, pageNum: "?", totalPages: "?"})

 

but where do I get the right values?

Stefan
Telerik team
 answered on 06 Dec 2016
17 answers
1.6K+ views
I need to export large table to pdf file using kendo pdfExport. This code I have so far:

html:

<div style="position:relative;" id="temp-container">
        <div style="position:absolute;left:0px;top:50px;width:100%;background:url('http://127.0.0.1:8000/images/arrow1.png') no-repeat;height:50px;"></div>
        <div style="position:absolute;left:26%;top:50px;font-size:28px;">Number</div>
        <div style="position:absolute;left:50%;margin-left:-50px;width:100px;top:90px;font-size:28px;">Original</div>
         
        <div style="position:absolute;right:0px;width:33%;top:50px;">Date1</div>
        <div style="position:absolute;right:0px;width:33%;top:80px;">Date2</div>
        <div style="position:absolute;right:0px;width:33%;top:110px;">Date3</div>
         
        <div style="position:absolute;left:0px;right:0px;top:150px;background:url('http://127.0.0.1:8000/images/arrow3.png') no-repeat;height:50px;background-size:100% 100%;"></div>
         
        <table cellpadding="6px" cellspacing="3px" border="0px" style="width:100%;position:relative;top:200px;">
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
            <tr>
                <td style="width:80px;position:relative;text-align:center;height:30px;line-height:30px;">
                    <div style="position:absolute;right:0px;top:0px;bottom:0px;width:22px;background:url('http://127.0.0.1:8000/images/background.png') repeat;">LP</div>
                </td>
                <td style="width:300px;background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">Index</td>
                <td style="background:url('http://127.0.0.1:8000/images/background.png') repeat-x;text-align:center;">TEXT</td>
            </tr>
        </table>
    </div>


and this is pdf export function call:

setTimeout(function () {
            kendo.drawing.drawDOM($("#temp-container"))
                .then(function (group) {
                    // Render the result as a PDF file
                    return kendo.drawing.exportPDF(group, {
                        paperSize: "A4",
                        multiPage: true,
                        margin: { left: "0cm", top: "1cm", right: "0cm", bottom: "1cm" }
                    });
                })
                .done(function (data) {
                    // Save the PDF file
                    kendo.saveAs({
                        dataURI: data,
                        fileName: "HR-Dashboard.pdf",
                        proxyURL: "http://demos.telerik.com/kendo-ui/service/export"
                    });
                });
        }, 1000);


My problem is that generated file has one page only. According to documentation http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#automatic-page-breaking-q1-2015 my table cannot be positioned as fixed or absolute and is not. I need to apply autopaging because I don't know how many elements will be in table. In example above is a lot of them but in some other cases one or two elements only. What am I doing wrong?

And another problem that drives me crazy is that I cannot adjust papersize. I tried to set A4, A5 in exportPDF attributes and set width and height of main container  in inches. But still the generated document is not properly adjusted. I think that paperSize A4 should automatically adjust main container to A4 size?
T. Tsonev
Telerik team
 answered on 06 Dec 2016
2 answers
11.2K+ views

Hi All,

 This is my click event code for search image of a template, but the click event doesn't fired.  Is there something missing here?  or is there a better way to do this?  TIA

 columns[{
                title: "Name",
                field: "Name",
                width: 225,
                template: "#=Name# <span class='k-icon k-i-close' id='temp' style='float: right;' click='test()'></span>",
                .....
            }],​

 

function test(){

   alert("Hello"); 

}

 

 

Nathan
Top achievements
Rank 1
 answered on 05 Dec 2016
1 answer
672 views

Hello!

I was wondering if there is a way to ensure, especially on mobile, that when a user taps into the editor for the first time and starts typing that the first letter is automatically capitalized?  I don't need each word capitalized, just the very first letter typed in the editor.

Thanks!

Rumen
Telerik team
 answered on 05 Dec 2016
1 answer
235 views
I'd like to overwrite the disabled cell class, so that for disabled cells, I can give a different font colour. Please can you give me the class name I should overwrite.
Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 05 Dec 2016
1 answer
81 views

Hi,

 

I'm trying to follow the example illustrated in http://dojo.telerik.com/OwUCE/44 about adding a custom button in the toolbar part of the Scheduler.

However i noticed that if you resize the browser window multiple times, the button (hence the "dataBound" event gets fired multiple times) therefore 

we get a lot of new buttons. Is there a way to force that this button is only created ONCE?

 

 

Veselin Tsvetanov
Telerik team
 answered on 05 Dec 2016
3 answers
245 views

I have a server side service that returns json that looks like [{appID:"11"},{appID:"22"}]

In this case the text and values are the same.

When I am doing a call to "value" function I see that a data is fetched from the server.

var combobox = $("#combobox").data("kendoComboBox");

combobox.value("11");

Why a call to server is required in case that the text and value are the same?

Is there a way to set the value without a need to fetch data from the server?

 

thanks,

Evyatar

Dimiter Topalov
Telerik team
 answered on 05 Dec 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?