Telerik Forums
Kendo UI for jQuery Forum
1 answer
214 views

I've got a grid with a child grid. I'm trying to provide edit functionality for the child grid. Add and Update functions don't work. When I press the Save button nothing happens. I noticed a knowledge base post discussing how to do this. We'll its not really a discussion just some code with a title but no description of what's going on. Reading the code it seems like there can be a binding issue with the parent grid. I implemented the same code in my grids and it made no difference. I removed what I thought was the code to help the binding problem from the sample and I can't see any difference in the operation of the girds. I'm wondering if someone could clue me in here? May this issues was fixed recently and I'm looking at an out dated article in the knowledge base, or, of course I could have screwed something up.

Here's the link to the knowledge base article.

https://docs.telerik.com/kendo-ui/knowledge-base/edit-master-row-data-in-detail-template

Here's a link to code where I attempted to remove the code for the parent table binding issue.

https://jsfiddle.net/6afd93pn/

Tsvetomir
Telerik team
 answered on 23 Apr 2020
2 answers
752 views

Hi all,

 

I try to add a watermark on an export to pdf using template model but it doesn't work.

somebody know how to do this ?

here the link of my try :

https://dojo.telerik.com/aGOHaDUt

<!DOCTYPE html>
<html>
<head>
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
 
     
     
 
 
 
</head>
<body>
   
<script type="x/kendo-template" id="page-template">
      <div class="page-template">
        
        <div class="watermark">C O N F I D E N T I A L</div>
         
      </div>
</script>
   
<div id="example">
    <div id="gantt"></div>
</div>
 
<style>
    /*
        Use the DejaVu Sans font for display and embedding in the PDF file.
        The standard PDF fonts have no support for Unicode characters.
    */
    .k-gantt {
        font-family: "DejaVu Sans", "Arial", sans-serif;
    }
 
    /* Hide toolbars during export */
    .k-pdf-export .k-gantt-toolbar
    {
        display: none;
    }
   
    .page-template .watermark {
        font-weight: bold;
        font-size: 400%;
        text-align: center;
        margin-top: 30%;
        color: #aaaaaa;
        opacity: 0.1;
        transform: rotate(-35deg) scale(1.7, 1.5);
    }
</style>
 
<script>
    // Import DejaVu Sans font for embedding
 
    // NOTE: Only required if the Kendo UI stylesheets are loaded
    // from a different origin, e.g. cdn.kendostatic.com
    kendo.pdf.defineFont({
        "DejaVu Sans"             : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans.ttf",
        "DejaVu Sans|Bold"        : "https://kendo.cdn.telerik.com/2016.2.607/styles/fonts/DejaVu/DejaVuSans-Bold.ttf",
    });
</script>
 
<!-- Load Pako ZLIB library to enable PDF compression -->
 
<script>
$(document).ready(function() {
    var serviceRoot = "https://demos.telerik.com/kendo-ui/service";
    var tasksDataSource = new kendo.data.GanttDataSource({
        batch: false,
        transport: {
            read: {
                url: serviceRoot + "/GanttTasks",
                dataType: "jsonp"
            },
            update: {
                url: serviceRoot + "/GanttTasks/Update",
                dataType: "jsonp"
            },
            destroy: {
                url: serviceRoot + "/GanttTasks/Destroy",
                dataType: "jsonp"
            },
            create: {
                url: serviceRoot + "/GanttTasks/Create",
                dataType: "jsonp"
            },
            parameterMap: function(options, operation) {
                if (operation !== "read") {
                    return { models: kendo.stringify(options.models || [options]) };
                }
            }
        },
        schema: {
            model: {
                id: "id",
                fields: {
                    id: { from: "ID", type: "number" },
                    orderId: { from: "OrderID", type: "number", validation: { required: true } },
                    parentId: { from: "ParentID", type: "number", defaultValue: null, validation: { required: true } },
                    start: { from: "Start", type: "date" },
                    end: { from: "End", type: "date" },
                    title: { from: "Title", defaultValue: "", type: "string" },
                    percentComplete: { from: "PercentComplete", type: "number" },
                    summary: { from: "Summary", type: "boolean" },
                    expanded: { from: "Expanded", type: "boolean", defaultValue: true }
                }
            }
        }
    });
 
    var dependenciesDataSource = new kendo.data.GanttDependencyDataSource({
        transport: {
            read: {
                url: serviceRoot + "/GanttDependencies",
                dataType: "jsonp"
            },
            update: {
                url: serviceRoot + "/GanttDependencies/Update",
                dataType: "jsonp"
            },
            destroy: {
                url: serviceRoot + "/GanttDependencies/Destroy",
                dataType: "jsonp"
            },
            create: {
                url: serviceRoot + "/GanttDependencies/Create",
                dataType: "jsonp"
            },
            parameterMap: function(options, operation) {
                if (operation !== "read" && options.models) {
                    return { models: kendo.stringify(options.models) };
                }
            }
        },
        schema: {
            model: {
                id: "id",
                fields: {
                    id: { from: "ID", type: "number" },
                    predecessorId: { from: "PredecessorID", type: "number" },
                    successorId: { from: "SuccessorID", type: "number" },
                    type: { from: "Type", type: "number" }
                }
            }
        }
    });
 
    var gantt = $("#gantt").kendoGantt({
        dataSource: tasksDataSource,
        dependencies: dependenciesDataSource,
        views: [
            { type: "week", selected: true },
            "month"
        ],
        columns: [
            { field: "id", title: "ID", width: 60 },
            { field: "title", title: "Title", editable: true, sortable: true },
            { field: "start", title: "Start Time", format: "{0:MM/dd/yyyy}", width: 100, editable: true, sortable: true },
            { field: "end", title: "End Time", format: "{0:MM/dd/yyyy}", width: 100, editable: true, sortable: true }
        ],
        toolbar: ["append", "pdf"],
        pdf: {
            fileName: "Kendo UI Gantt Export.pdf",
            proxyURL: "https://demos.telerik.com/kendo-ui/service/export",
            template: $("#page-template").html()
        },
        height: 700,
 
        showWorkHours: false,
        showWorkDays: false,
 
        snap: false
    }).data("kendoGantt");
 
    $(document).bind("kendo:skinChange", function() {
        gantt.refresh();
    });
});
</script>
 
 
 
</body>
</html>

 

thx for help :)

Ry
Top achievements
Rank 1
 answered on 23 Apr 2020
7 answers
796 views
I am using kendo grid to populate data in that grid i use HTML table as datasource. With the help initialization from table demo sample i loaded data in grid. But my problem is to show pagination for that grid?
Viktor Tachev
Telerik team
 answered on 22 Apr 2020
3 answers
859 views

Hello,

Do you have a localization support ?

Can the date picker be shown an Hebrew text for the months ?

 

Thx

Sagi

Viktor Tachev
Telerik team
 answered on 22 Apr 2020
3 answers
455 views
When I try to run the a function, the grid does not detect this and gives an error.
Preslav
Telerik team
 answered on 22 Apr 2020
3 answers
339 views

To start I am super new to kendo and I have really enjoyed it.

I have written a custom edit method which launches a kendoDialog when the edit command button on the grid is clicked containing that specific grid row's data (to be edited) the issue I'm having is that it only works one time. After that, when I click edit the dialog appends to the DOM but with a display of none. So if I wanted to edit another record I would have to refresh the screen which obviously isn't ideal. I have a feeling I am just missing something and thought someone might be able to see something I'm missing/need to add. Here is the code:

 

Here is the command in my grid:

{ command: {text:"Edit", click:GetMessageToUpdate}, title: " ", width: "90px" }

 

This is the GetMessageToUpdate function:

    function GetMessageToUpdate(e) {
        e.preventDefault();
        var grid = $("#messagesGrid").data("kendoGrid")

        var obj = { messageID: grid.dataItem(e.toElement.closest("tr")).messageID };

        $.ajax({
            url: "URL_FOR_UPDATE_METHOD",
            type: "POST",
            data: JSON.stringify(obj),
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            error: function (response) {
                $("#errorRemove").show();
            },
            success: function (response) {
                console.log(response.Data)
                let msgObj = response.Data
                renderUpdateModal(msgObj)
                $('#updateErrorMessage').hide()
                $('#updateSuccessMessage').hide()
                cache: false
            }
        })
    }

This is the code for the renderUpdateModal:

 function renderUpdateModal(obj) {
        console.log(obj)
        $("#editContainer").kendoDialog({
            width: "450px",
            title: "Edit Message",
            closable: true,
            modal: true,
            content: `Here is where the dialog code lives I didn't think it was important but if you need it I can supply it!`
          });

any help or suggestions are super appreciated. 

 

Thanks,

Jordan

Georgi
Telerik team
 answered on 22 Apr 2020
7 answers
69 views

Is there any documentation on how to implement the search bar that can be found on the telerik website? (see attachment)

The idea is to be able to accept users' input, while giving the option of limiting search in the different grid-columns, for example: All, Col1, Col2. 

 

Thanks in advance!

 

 

 

syian
Top achievements
Rank 1
Veteran
 answered on 22 Apr 2020
1 answer
181 views

Is it possible to place several elements on one page?

Only one element works fully

Aleksandar
Telerik team
 answered on 22 Apr 2020
5 answers
2.7K+ views

Hi there,

I'm struggling to make a kendo numeric textbox control make the user input as readonly but allow the user to use the spinner.  The readonly method makes the control not usable entirely.  I want only the user input box to be disabled, but the spinner should be working as is.

Is there any method or configuration that I can use? or does this feature is not supported on the current version?

 

 

Regards,

Junius

Nikolay
Telerik team
 answered on 21 Apr 2020
3 answers
1.7K+ views

I am using Kendo grid with angular js. In some cases the data in grid is long text like "New, Initial Auto-Polling Config, Auto-Polling " or greater in length. I want all data to be displayed the data is getting trimmed down and ellipsis getting added making above text as "New, Initial Auto-Polling Conf.."

Also the inner HTML dooesn't have the original text.

Please help me best possible solution to display the text

 

 

 

Viktor Tachev
Telerik team
 answered on 21 Apr 2020
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
Accessibility
Effects
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
AICodingAssistant
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
+? 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?