Telerik Forums
Kendo UI for jQuery Forum
3 answers
287 views
I use the editor with the following options, because i want to have <br> in my text and no <p>.

   defaultTools["insertLineBreak"].options.shift = false;
   defaultTools["insertParagraph"].options.shift = true;

The problem now is that if I select a part of the tekst to make eg a H1, the total tekst is converted in H1. The  same if I want to make a bullet-list. The different lines of the list are defined by kendo as paragraphs (<p>), while i use <br> to separate the lines. The result is a single bullet for the complete text.

How do i get the possibility of eg bulletlists when i don’t want <p> in my text?

Thanks

Nikolay
Telerik team
 answered on 13 Feb 2017
3 answers
130 views

In one grid i have a dropdownlist editor in one column. When grid load, i see the value but when i edit my row (inline), the value is not selected in dropdownlist. When i click on the arrow dropdownlist expand and close immediatly. What is my problem ?

@* Liste des téléphones *@
        var phoneDs = new kendo.data.DataSource({
            transport: {
                read:  {
                    url: "@Url.Action("ShowPhones", "SupplierInformations")",
                    method: "post",
                    dataType: "json"
                },
                update: {
                    url: "@Url.Action("UpdatePhone", "SupplierInformations")",
                    method: "post",
                    dataType: "json"
                },
                destroy: {
                    url: "@Url.Action("DeletePhone", "SupplierInformations")",
                    method: "post",
                    dataType: "json"
                },
                create: {
                    url: "@Url.Action("AddPhone", "SupplierInformations")",
                    method: "post",
                    dataType: "json"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                    else
                    {
                        //return options;   
                    }
                }
            },
            batch: true,
            autoSync: true,
            schema: {
                model: {
                    id: "PhoneId",
                    fields: {
                        PhoneId: { editable: false, nullable: true },
                        PhoneNumber: { validation: { required: true,
                            phonevalidation: function (input) 
            {
                                if (input.is("[name='PhoneNumber']")) {
                                    input.attr("data-phonevalidation-msg", "@LocalizationValues.The_Phone_Number_Format_Is_Invalid");
                                                    return /^@RegexHelper.PhoneRegex^/.test(input.val());
                }

                                                return true;
        }
                        } },
                        PhoneExtension: { validation: { required: false,
                            extensionvalidation: function (input) 
                            {
                                if (input.is("[name='PhoneExtension']") && input.val() != "") {
                                    input.attr("data-extensionvalidation-msg", "@LocalizationValues.The_Phone_extension_Is_Invalid");
                                    return /^\d+$/.test(input.val());
                                }

                                return true;
                            }}},
                        PhoneTypes:  { validation: { required: true} },
                        IsEmergency: { type: "boolean" },
                        Type: { validation: { required: true,
                    typevalidation: function (input) 
                    {
                        if (input.is("[name='Type']")) {
                            input.attr("data-typevalidation-msg", "@LocalizationValues.The_Phone_Type_Is_Mandatory");
                                    return (input.val() != "");
                                }

                                return true;
                            }
                } }
    }
                }
            }
        });

        $("#phoneGrid").kendoGrid({
            dataSource: phoneDs,
            pageable: false,
            dataBound: function(e){ },
            pageSize: 99999,
            toolbar: [ {name: "create", text : "@LocalizationValues.Add"}],
            columns: [
                { field: "Type", width: "130px", editor: typeDropDownEditor, title: "Type"},
        {
                field: "PhoneNumber", editor: phoneEditor, title: "PhoneNumber", format: "{0:n}", width: "250px" },
                { field: "PhoneExtension", title:"PhoneExtension", width: "150px", template: '@LocalizationValues.Ext: #: (PhoneExtension == null) ? "" : PhoneExtension#' },
                { command: [{ name : "edit", text: {
                    edit: "@LocalizationValues.Update",
                    update: "@LocalizationValues.Confirm",
                    cancel: "@LocalizationValues.Cancel"
                }},
                { name : "destroy", text: "@LocalizationValues.Remove"}], title: "&nbsp;", width: "250px"}],
            editable: {mode : "inline", confirmation: false},
        });

 

   function typeDropDownEditor(container, options) {
        $('<input name="' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                autoBind: false,
                dataTextField: "Text",
                dataValueField: "Value",
                dataSource: @(New HtmlString(Json.Encode(Model.PhoneTypes)))
        });

Boyan Dimitrov
Telerik team
 answered on 13 Feb 2017
2 answers
205 views

documentation for router change event says that navigation can be canceled with preventDefault

but i want to ask user before leaving current view if is ok to leave unsaved changes.

can be done using promises ?

John
Top achievements
Rank 1
 answered on 13 Feb 2017
1 answer
916 views

Hello,

I have a grid with some cells having a value in multiple lines format. When I tried to export it, the export result set the cell height as a single line.

Is there a way to set the height to auto?

 

Cheers

Pavlina
Telerik team
 answered on 11 Feb 2017
9 answers
2.7K+ views

I am trying  to export a long webpage with many grids and charts to a pdf file with multiple pages. I tried to use the forcePageBreak property but this property breaks the generated pdf. Here is the javascript code of the pdf export:

 exportToPdf:function (){

var className = $(this).data('groupname');

$('.'+className).find('.k-grid-excel').hide();

$('.'+className).find('.removeFromReport').hide();

kendo.drawing.drawDOM($("."+className),

{

forcePageBreak: ".page-break",

margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" },

paperSize: "auto",

landscape: true,

multiPage: true }) .then(function(group) { 

return kendo.drawing.exportPDF(group, { }); }) .done(function(data) {

kendo.saveAs({

dataURI: data,

fileName: "systemReport.pdf",

proxyURL: "//demos.telerik.com/kendo-ui/service/export" });

$('.'+className).find('.k-grid-excel').show();

$('.'+className).find('.removeFromReport').show();

});

}

I will also attach a zip file with the generated pdf with and without the property forcePageBreak.

Is there any other way to achieve the same functionality.

Many thanks in advance

Nisarg
Top achievements
Rank 1
 answered on 10 Feb 2017
2 answers
227 views

I'm using the upload widget in via the MVVM framework, and was wondering if there are any options for me to control the text of the "Select files..." button or specify a drop zone via the data-* attributes. 

If you have any kind of dojo sample for this I would really appreciate it.

Thanks -

Erik

Erik
Top achievements
Rank 2
 answered on 10 Feb 2017
4 answers
186 views

Hi,

http://dojo.telerik.com/IyoVU/6

In this dojo, I'm trying to mix validation tooltips on simple fields, with custom validation on grid columns.  I've used your grid example which validates for the product name beginning with a capital.  Run the example, add a row to the grid, enter a product name that is invalid, e.g. "a" and tab off.  The product validation tooltip message is not shown, when I think it should be.  What am I doing wrong?

 

Thanks,

 

Scott

Stefan
Telerik team
 answered on 10 Feb 2017
3 answers
588 views

Hello Telerik,

 

I have a problem with the kendo.saveAs() because the server, where the binary files come from, requires an 'Authorization' in the request headers.

I have been looking for an answer but all I found was that the question was asked before, by somebody else, on StackOverflow: http://stackoverflow.com/questions/41406918/kendo-server-export-post-request-headers

But no useful answer was given so i pop the question here because I do need an answer for this :(

 

Best regards,

 

Insad

Boyan Dimitrov
Telerik team
 answered on 10 Feb 2017
3 answers
181 views

Hi,

I'm trying to display a partial view in a treelist column 

This is the colum definition:

columns.Add().Field(e => e.PageID)
                .TemplateId("translation-template")                 
                .HtmlAttributes(new { @class = "center col-lg-2" });

 

In this codesnippit, the PageID in the first div is displayed correctly for each row in my treelist.

Now I want to use the #: PageID # to be pass into the Html.RenderAction as a parameter (instead of 4)

<script id="translation-template" type="text/x-kendo-template">
        <div>#: PageID #</div>
        <div>
            @{Html.RenderAction("_TranslationTemplate",
                         "Pages",
                          new { PageID = 4 });
                }
        </div>
    </script>

 

Thank you!

Boyan Dimitrov
Telerik team
 answered on 10 Feb 2017
2 answers
169 views

Hello

I am trying to use Angular Kendo UI Tooltup within the Kendo Validator's errorTemplate but tooltip does not seem to work. Is this supported?

See example http://dojo.telerik.com/IDamo/12

Thanks

 

 

 

James
Top achievements
Rank 1
 answered on 10 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
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?