Telerik Forums
Kendo UI for jQuery Forum
1 answer
120 views
When my grid has a vertical scroll bar the row cells and the headers are misaligned. I understand that they are rendered as two separate things but how do I tell the grid to compensate the headers as well as the rows for the scroll bars?
Dimiter Topalov
Telerik team
 answered on 20 Jun 2016
1 answer
556 views

We have a C# MVC application that allows employees to enter hours spent per day on various activities for a given week (see the attached screenshot). However, one of the requirements of the application is that it update our Enterprise Resource Planning (ERP) system that we currently use. These updates must go into an intermediate table between this application and the ERP system. A stored procedure then picks up the data from this intermediate table and updates the ERP system appropriately. The trouble we are running into is getting the data accurately into the intermediate table. It needs the data put in as daily totals...

Date             Hours

6/1/2016       9

6/2/2016       8

6/3/2016       8.5

Can I mark every row in the grid as changed, whether it has changed or not, so that all the rows get sent over to my controller? We'd like to do this to make the processing of the data that's going into the intermediate table easier. Or, is it possible to send over the "Daily Totals" row in the footer? These are fields that are set on the DataSource using the built in Aggregates method. Our DataSource is configured as follows...

.DataSource(dataSource => dataSource
            .Ajax()
            .Aggregates(aggregates =>
            {
                aggregates.Add(t => t.Sunday).Sum();
                aggregates.Add(t => t.Monday).Sum();
                aggregates.Add(t => t.Tuesday).Sum();
                aggregates.Add(t => t.Wednesday).Sum();
                aggregates.Add(t => t.Thursday).Sum();
                aggregates.Add(t => t.Friday).Sum();
                aggregates.Add(t => t.Saturday).Sum();
                aggregates.Add(t => t.TotalHours).Sum();
            }
            )
            .Batch(true)
            .ServerOperation(false)
            .Events(events => events.Error("timesheetGrid_error_handler"))
            .Events(events => events.Change("timesheetGrid_change"))
            .Events(events => events.RequestEnd("timesheetGrid_requestEnd"))
            .Model(model => model.Id(t => t.rowId))            
            .Create(create => create.Action("Index_Create", "Home").Data("getCreateParams"))
            .Destroy(destroy => destroy.Action("Index_Delete", "Home").Data("getUpdateParams"))
            .Read(read => read.Action("Index_Read", "Home").Data("getReadParams"))
            .Update(update => update.Action("Index_Update", "Home").Data("getUpdateParams"))
        )

 

Danail Vasilev
Telerik team
 answered on 20 Jun 2016
1 answer
276 views

Hello Telerik,

I want use event features in Kendo UI calendar.

Example-

First Requirement - For attendance showing I want show on every date 

P - Present

A - Absent

FH, SH - first half, second half

L - leave 

Second Requirement - suppose I am going to click on P (present date) after click on that i want show the other details on same page or open popup or dialog for show IN Time and OUT Time details.

Please let me know about these two requirement how can I achieve the same using Kendo UI.

 

Thanks

Dimiter Topalov
Telerik team
 answered on 20 Jun 2016
1 answer
137 views

Hello Telerik,

I was using in Date Range Selection, Single Selection and No Selection (Read Only) Telerik Calendar in native android app. But Now I am moving to Cordova based hybrid application so that I am using Kendo UI for Calendar in that. Please let me know How I will achieve this things with Kendo UI for Hybrid App(Android & iOS)

Please let me know asap

Thanks

Georgi Krustev
Telerik team
 answered on 20 Jun 2016
5 answers
1.4K+ views
Hi Telerik,

are you planning to implement charts with 3D look, like FusionCharts?
If yes, in which release?

Regards,
Ingo
Iliana Dyankova
Telerik team
 answered on 20 Jun 2016
1 answer
1.0K+ views

Hello Telerik,

I want to apply date cell background colour according to working shift.

like -

General Shift - Green Background for all General shift date.

Holiday - Blue Background for all Holiday shift date.

Week Off - Red Background for all Week Off shift date.

Please guide me how can I achieve the same using Kendo UI calendar.

 

Thanks

 

Dimiter Topalov
Telerik team
 answered on 20 Jun 2016
1 answer
303 views

I'm having an issue with CRUD calls being repeated. It only happens if I make two CRUD calls in a row, the second one pulls in the first one's data. For example, if I have a grid that has three records on it:

1. I hit delete on the first record which successfully deletes that record, no issues (note that I AM returning the ID of that record back to the grid)

2. I hit delete on the second record and it uses that model's data of the first record. Entity framework of course throws an error because it can no longer find that entity since it was deleted in the first call.

controller:

public ActionResult CostsDestroy(string models)
{
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    CapitalLeaseCostModel model = new CapitalLeaseCostModel();
    var CapitalLeaseCostModelArray = serializer.Deserialize<CapitalLeaseCostModel>(models);
    model = AccountingService.DeleteCapitalLeaseCost(CapitalLeaseCostModelArray);
 
    return PartialView(Json(model));
}

 

View:

@model DataNet.Common.Models.CapitalLease.CapitalLeaseCostModel
 
 
@*grid script*@
<script>
 
    $(document).ready(function () {
 
        dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "/CapitalLease/CostsRead",
                    dataType: "json"
                },
                update: {
                    url: "/CapitalLease/CostsUpdate",
                    dataType: "json",
                    type: "POST",
                    complete: function (e) {
                        var grid = $('#capitalizedCostGrid').data("kendoGrid");
                        grid.dataSource.read();
                    }
                },
                destroy: {
                    url: "/CapitalLease/CostsDestroy",
                    dataType: "json",
                    type: "POST",
                    complete: function (e) {
                        e.success(data);
                        var grid = $('#capitalizedCostGrid').data("kendoGrid");
                        grid.dataSource.read();
                    }
                },
                create: {
                    url: "/CapitalLease/CostsCreate",
                    dataType: "json",
                    type: "POST",
                    complete: function (e) {
                        e.success(data);
                        var grid = $('#capitalizedCostGrid').data("kendoGrid");
                        grid.dataSource.read();
                    }
                },
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        options.models[0].StartDate = kendo.toString(kendo.parseDate(options.models[0].StartDate, 'yyyy-MM-dd'), 'MM/dd/yyyy');
                        options.models[0].EndDate = kendo.toString(kendo.parseDate(options.models[0].EndDate, 'yyyy-MM-dd'), 'MM/dd/yyyy');
                    }
                    if(operation === "create" && options.models){
                        options.models[0].EscalationTypeID = options.models[0].EscalationTypeID.ID;
                        options.models[0].EscalationFrequencyID = options.models[0].EscalationFrequencyID.ID;
                    }
                    if (operation === "destroy" && options.models) {
                        return { models: kendo.stringify(options.models[0]) };
                    } else {
                        return { models: kendo.stringify(options.models), keyID: 106715 };
                    }
                }
 
 
            },
            batch: true,
            pageSize: 20,
            schema: {
                model: {
                    id: "ID",
                    fields: {
                        ID: { editable: true, nullable: false, defaultValue: -1 },
                        Reason: { validation: { required: true } },
                        CapitalLeaseEscalationType: {
                            defaultValue: {
                                ID: 1,
                                EscalationType: "No Escalation"
                            }
                        },
                        CapitalLeaseEscalationFrequency: {
                            defaultValue: {
                                ID: 1,
                                EscalationFrequency: "Monthly"
                            }
                        },
                        EscalationTypeID: {
                            defaultValue: {
                                ID: 1,
                                EscalationType: "No Escalation"
                            }
                        },
                        EscalationFrequencyID: {
                            defaultValue: {
                                ID: 1,
                                EscalationFrequency: "Monthly"
                            }
                        }
                    }
                }
            }
        });
 
        $("#capitalizedCostGrid").kendoGrid({
            dataSource: dataSource,
            toolbar: ["create"],
            columns: [
            {
                field: "ID",
                title: "ID",
                hidden: true
 
            },
            {
                field: "Reason",
                title: "Reason"
            },
            {
                field: "Amount",
                title: "Amount",
                format: "{0:c}"
            },
            {
                field: "StartDate",
                title: "Start Date",
                type: "date",
                format: "{0:yyyy-MM-dd}",
                template: "#= kendo.toString(kendo.parseDate(data.StartDate, 'yyyy-MM-dd'), 'MM/dd/yyyy') #",
                editor: dateTimeEditor
                 
            },
            {
                field: "EndDate",
                title: "End Date",
                type: "date",
                format: "{0:yyyy-MM-dd}",
                template: "#= kendo.toString(kendo.parseDate(data.EndDate, 'yyyy-MM-dd'), 'MM/dd/yyyy') #",
                editor: dateTimeEditor
            },
            {
                field: "EscalationTypeID",
                title: "Escalation Type",
                editor: escalationTypeDropDownEditor,
                template: "#=CapitalLeaseEscalationType.EscalationType#"
            },
            {
                field: "EscalationFrequencyID",
                title: "Escalation Frequency",
                editor: frequencyTypeDropDownEditor,
                template: "#=CapitalLeaseEscalationFrequency.EscalationFrequency#"
            },
            {
                field: "EscalationPercentage",
                title: "Escalation Percent",
                template: "<div> #= kendo.toString(data.EscalationPercentage / 100, 'p0') #</div>"
            },
            {
                field: "EscalationMonetary",
                title: "Monetary Escalation",
                format: "{0:c}"
            },
            {
                command: ["edit", "destroy"], title: "Edit", width: "200px"
            }
            ],
            editable: "popup",
            edit: function (e) {
                e.container.find(".k-edit-label:first").hide();
                e.container.find(".k-edit-field:first").hide();
            },
            height: 200,
            autoSync: true
 
        })
 
        @*Attaches to Escalation type drop down list*@
        function escalationTypeDropDownEditor(container, options) {
        $('<input required data-text-field="EscalationType" data-value-field="ID" data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                autoBind: true,
                dataSource: {
                    type: "json",
                    transport: {
                        read: "/CapitalLease/CostsEscalationTypeRead"
                    }
                }
            });
        }
 
        @*Attaches to Escalation Frequency drop down list*@
        function frequencyTypeDropDownEditor(container, options) {
        $('<input required data-text-field="EscalationFrequency" data-value-field="ID" data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                autoBind: true,
                dataSource: {
                    type: "json",
                    transport: {
                        read: "/CapitalLease/CostsEscalationFrequencyRead"
                    }
                }
            });
        }
 
        @*Formats the date-picker in-grid*@
        function dateTimeEditor(container, options) {
        $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
                .appendTo(container)
                .kendoDatePicker({});
        }
 
    });
 
 
</script>
 
<style>
    .k-grid  .k-grid-header  .k-header  .k-link {
        height: auto;
    }
   
    .k-grid  .k-grid-header  .k-header {
        white-space: normal;
    }
</style>
 
 
@*Rent Information*@
<p class="title">Section Two - Lease Costs to Capitalize</p>
<div style="padding:15px;">
    <div id="costsRowOne">
        <div id="capitalizedCostGrid" class="inline-control"></div>
    </div>
</div>

 

What am i missing here. 

 

Vi Le
Top achievements
Rank 1
 answered on 18 Jun 2016
2 answers
184 views

Hello, 

I have a datasource in which i have initialized a validation as this:

  minvaluevalidation: function (input) {

                                        if (input.is("[name='minValue']")) {
                                            if ((parseFloat($("input[type='text'][name='minValue']").val()) > parseFloat($("input[type='text'][name='maxValue']").val()))) {
                                                input.attr("data-minvaluevalidation-msg", "Min Value should be less than Max Value");
                                                return false;
                                            }
                                        }

                                        return true;
                                    }
                                }

(also relative to maxvaluevalidation field)

 

I have a grid to which this datasource is bound. The user can insert rows in this grid and everything works fine.

Let's suppose I have typed for minValue the number 6 and then for maxValue the number 5.

Then the minvaluevalidation function says 'false' there is a validation problem. Ok, I try to type 7 for the maxValue(bigger than 6) and click the 'update' button of the edit form of kendo. Here I know that this is valid and also the maxvaluevavlidation function returns true. But the 'update' or 'create' transport (CRUD operation) function has wrong data, there is no pair [6;7] there is pair [0;7] (or instead 0, the last valid typed number in grid) and the grid is updated with values 0 and 7....not with 6 and 7

 

So when validation is broken for minValue, if I fix this for maxValue(not for minValue) and suddenly click 'update' while the validation message is still visible for minValue the data passed to the transport functions is wrong.

Here If I try to change minValue to 3 and then again to 6 everything is updated and the transport function has right data, the grid has right data.

Thanks!

 

 

 

 

zhivko.zhelezov
Top achievements
Rank 1
 answered on 18 Jun 2016
3 answers
161 views

Hi!

After reading this blog post, I came a little nervous of the future of Kendo MVVM and templating. We have some applications that are built around this functionality. Can we trust that the functionality will stay with Kendo in the future so we can use it on larger projects too? I think it is nice to have all the functionality via Kendo and no need for overhead of third party libraries and integrating them.

I hope I will get some answers directly from Telerik too - thanks!

Burke
Telerik team
 answered on 17 Jun 2016
1 answer
577 views

Hello Telerik,

I want to do some change in Kendo UI calendar like...Date selection colour, date text colour change and Header /footer / Background colour changes.

Please let me know how can I do this.

Thanks

Iliana Dyankova
Telerik team
 answered on 17 Jun 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?