Telerik Forums
Kendo UI for jQuery Forum
1 answer
186 views

I have a grid in batch editing mode. When I click on add new row, it triggers a create event and when I edit a row , it triggers an update event. This is all good and it is as per documentation.

But My requirement is as such When I click on "add new row" it should trigger an update event instead of create event is that possible ?

What I am trying to do is , since it is batch save. So even a new row added should be treated like modifying a row. So for example if I do the following

(1) Add a new row

(2) modify an existing row

On clicking save changes button, it should trigger a update action and 2 objects should be sent to server for update . Please let me know if it is possible ?

 

Konstantin Dikov
Telerik team
 answered on 17 Aug 2016
1 answer
835 views

Below is my kendo chart where I'm binding the datasource via angular.  The data displays but I want my field which is monthTotal to be formatted as currency.

<div kendo-chart
k-legend="{ position: 'bottom' }"
k-series-defaults="{ type: 'line' }"
k-series="[ { field: 'monthTotal', name: 'Monthly Total', categoryField: 'invoiceDate' } ]"
k-data-source="refunds6Months"
style="height: 250px;"></div>

Daniel
Telerik team
 answered on 17 Aug 2016
5 answers
455 views
Sorting by date issue..

<table id="grid">
                <thead>
                    <tr>
 <th>SNO</th>
                        <th data-field="NAME">NAME</th>
                        <th data-field="EMPID">EMPID</th>
                        <th data-field="CATEGORY">CATEGORY</th>  
                        <th data-field="SUBCATEGORY">SUBCATEGORY</th>  
                        <th data-field="CONTACTDURING">CONTACTDURING</th>  
                        <th data-field="DEPARTMENT">DEPARTMENT</th>  
                        <th data-field="SUBDEPARTMENT">SUBDEPARTMENT</th>  
                        <th data-field="STATUS">STATUS</th>  
                        <th data-field="datefrom">FROM DATE</th>
                        <th data-field="TODATE">TO DATE</th>
                        <th data-field="TOTALDAYS">TOTALDAYS</th>
                        <th data-field="DEATHCATEGORY">DEATHCATEGORY</th>                         
                    </tr>
                </thead>
                <tbody>
                   <?php
$i=1;

                       foreach($leaveInfo as $records){  
                           $newDate = date("d/M/y", strtotime( $records['FROMDATE']));
                           $newDate1 = date("d/M/y", strtotime( $records['TODATE']));
                           ?>                  
                           <tr>
                      <td></td>
                      <td><a href="<?php echo $this->baseUrl()?>/index/employeeprofile/id/<?php echo $records['EMPID']?>"><?php echo $records['NAME']?></a></td>                      <td><?php echo $records['EMPID']?></td>
                      <td><?php echo $records['CATEGORY']?></td>
                      <td><?php echo $records['SUBCATEGORY']?></td>
                      <td><?php echo $records['CONTACTDURING']?></td>
                      <td><?php echo $records['DEPARTMENT']?></td>
                      <td><?php echo $records['SUBDEPARTMENT']?></td>
                      <td><?php echo $records['STATUS']?></td>
                      <td><?php echo $newDate;?></td>
                      <td><?php echo $newDate1;?></td>
                      <td><?php echo $records['TOTALDAYS']?></td>
                      <td><?php echo $records['DEATHCATEGORY']?></td>
                           </tr>              
                   <?php }?>
                </tbody>
</table>
<?php }else{   echo "</br></br><div align='center'><h2>No Leave Record Found</h2></div>";
}?>
<script type="text/javascript">
 var record=0;
$("#grid").kendoGrid({
        schema: {
        model: {
            fields: {
SNO: { type: "number"},
                NAME: { type: "string"},
                EMPID: { type: "string"},  
                CATEGORY: { type: "string" },  
                SUBCATEGORY: { type: "string" },  
                CONTACTDURING: { type: "string" },  
                DEPARTMENT: { type: "string" },  
                SUBDEPARTMENT: { type: "string" },
                STATUS: { type: "string" },
                datefrom: { type: "date" },  
                TODATE: { type: "date" },  
                TOTALDAYS: { type: "string" },
                DEATHCATEGORY: { type: "string" }  
                  
                
            }
            
        }
    },
    groupable: true,
    navigatable: true,
    columnMenu: true,
    columns: [
     {
         title: "&nbsp;",
         template: "#= ++record #",
         width: 60
       
    },
 {
        field: "NAME",
        title: "NAME",
       
    },
 
    {
        field: "EMPID",
        title: "EMPID",
       
    },
    {
        field: "CATEGORY",
        title: "CATEGORY",
       
    },
    {
        field: "SUBCATEGORY",
        title: "SUBCATEGORY",
       
    },
    {
        field: "CONTACTDURING",
        title: "CONTACTDURING",
       
    },
    {
        field: "DEPARTMENT",
        title: "DEPARTMENT",
       
    },
    {
        field: "SUBDEPARTMENT",
        title: "SUBDEPARTMENT",
       
    },
    {
        
        field: "STATUS",
     title: "STATUS",
       
       
    },
    {
         field: "datefrom",
         title: "FROMDATE",
         template: '#= kendo.toString(kendo.parseDate(datefrom, "dd/MMM/yy"), "dd/MMM/yy") #'
         //format: "{0:dd/MMM/yy}"
           
        },  
    {
        
          field: "TODATE",
        title: "TODATE",
        template: '#= kendo.toString(kendo.parseDate(TODATE, "dd/MMM/yy"), "dd/MMM/yy") #'
        //format: "{0:yy}",
      },
      {
          field: "TOTALDAYS",
          title: "TOTALDAYS",
          
         
      },
     
    
    {
       
        field: "DEATHCATEGORY",
     title: "DEATHCATEGORY",
    }
],
 
    scrollable: true,
    navigatable: true,
    sortable: true,
    filterable: true,
    editable: "popup",
    
    dataBinding: function() {
        record = 0;
       
      }
   });

in above code from date and to date is not sorting  properly..

Please help..
Daniel
Telerik team
 answered on 17 Aug 2016
1 answer
209 views

Hi guys,

I'm currently using Angular 1.5.x with Kendo UI Professional, the latest release (version 2016.2.504).  

I have a kendo grid which uses row templates.  In these row templates, I have a number of angular directive elements that is basically a wrapper around the Kendo combo box and a button.  The kendo combo box is bound to a remote data source using the kendo.data.DataSource object.  Whenever I attempt to add a new Row or remove an existing row from the Kendo grid, I think Kendo redraws everything in the grid and all of my angular elements get recreated so that each angular element with the remote data source goes through a DataBound event and calls the remote source again.  This is highly inefficient is something that I want to avoid overall.  I know that if I just use a plain old kendo combo box instead of my angular wrapper element, this doesn't happen, but that's not what I want.  Can anyone help me with this?  Is there some way I can stop the angular element from being recreated whenever I want to add a new row or remove an existing row from the Kendo grid?

 

Thanks in advance for the help!  

Vladimir Iliev
Telerik team
 answered on 16 Aug 2016
1 answer
101 views

Idea was born because of this answer.

I propose you should reconsider splitting options into two interfaces. One for constructor and one for common use. TypeScript users would gain a lot, since this tell us which properties exists on specific widget and are safe to use.

The other benefit is to avoid typecasting to any.

Propose definition structure:

class Window extends kendo.ui.Widget
{
 
    static fn: Window;
 
    options: WindowProperties;      //notice a change
 
    readonly isMaximized?: boolean;
 
    element: JQuery;
    wrapper: JQuery;
 
    static extend(proto: Object): Window;
 
    constructor(element: Element, options?: WindowOptions);
 
 
    center(): kendo.ui.Window;
    close(): kendo.ui.Window;
    content(): string;
    content(content?: string): kendo.ui.Window;
    content(content?: JQuery): kendo.ui.Window;
    destroy(): void;
    maximize(): kendo.ui.Window;
    minimize(): kendo.ui.Window;
    open(): kendo.ui.Window;
    pin(): void;
    refresh(options: any): kendo.ui.Window;
    restore(): kendo.ui.Window;
    setOptions(options: any): void;
    title(): string;
    title(text?: string): kendo.ui.Window;
    toFront(): kendo.ui.Window;
    toggleMaximization(): kendo.ui.Window;
    unpin(): void;
 
}
 
interface WindowOptions {
    name?: string;
    actions?: any;
    animation?: boolean|WindowAnimation;
    appendTo?: any|string;
    autoFocus?: boolean;
    content?: WindowContent;
    draggable?: boolean;
    iframe?: boolean;
    height?: number|string;
    maxHeight?: number;
    maxWidth?: number;
    minHeight?: number;
    minWidth?: number;
    modal?: boolean;
    pinned?: boolean;
    position?: WindowPosition;
    resizable?: boolean;
    scrollable?: boolean;
    title?: string|boolean;
    visible?: boolean;
    width?: number|string;
    activate?(e: WindowEvent): void;
    close?(e: WindowCloseEvent): void;
    deactivate?(e: WindowEvent): void;
    dragend?(e: WindowEvent): void;
    dragstart?(e: WindowEvent): void;
    error?(e: WindowErrorEvent): void;
    maximize?(e: WindowEvent): void;
    minimize?(e: WindowEvent): void;
    open?(e: WindowEvent): void;
    refresh?(e: WindowEvent): void;
    resize?(e: WindowEvent): void;
}
 
interface WindowProperties extends WindowOptions
{
    isMaximized?: boolean;
}

T. Tsonev
Telerik team
 answered on 16 Aug 2016
1 answer
93 views

We generate a rather complex nested div and when we use drawDOM to export to PDF it works most of the time.  Sometimes, however, it drops one of the internal divs.  This only happens in Chrome, and not in IE or Firefox.

Please see sample code at dojo.telerik.com/uTAnE/5

Note then when run Safari, the exported PDF correctly includes both boxes on the 13th (the yellow and the gray box).  On Chrome, however, the yellow box is missing.  This seems to be data-dependent as if we have more internal boxes, everything is OK.

Any help you could provide would be greatly appreciated.

 

 

 

 

 

Dimo
Telerik team
 answered on 16 Aug 2016
1 answer
761 views

Hi folks,

 

I have a requirement for events to be scheduled in 5 minute increments, I have implemented the following code in the scheduler config:

views: [
    {
      type: "day",
      minorTickCount: 30, // display one time slot per major tick
      majorTick: 60
    },
  ]

This serves the purpose but the actual slots are around 30 pixels in height, this means that the schedule for the full day is very long and

overflows off the bottom of the page. Ideally I would like the entire schedule to only take up a max of 900-1000px in height with the slots

being much smaller in height, is there an intelligent way of doing this?

 

Thanks in advance

 

Vladimir Iliev
Telerik team
 answered on 16 Aug 2016
5 answers
441 views
Is it possible to implement track changes through the jquery set up of the editor?  Example $("ObjectName").kendoEditor({ tools: [    "trackchanges"   ] }); }); is there something to this effect?
Stanimir
Telerik team
 answered on 16 Aug 2016
1 answer
727 views

Hi

While page refreshes and reloads, DropDown list shows Drop Down's selected value in a textbox. Though Once page is loaded it is all fine. But for our purpose it is not desirable to show value that dropdown is binded to. If it had shown the selected text it would have been ok. We also don't want to hide the drop down untill page is ready and show it.

 I dont see it is a performance issue as well since i created a seperate view and had only dropdown control in the entire view. Have provided sample code that you can execute to test the behavior

@model ViewModels.DdlVM

@using (@Html.BeginForm())
{
@(Html.Kendo().DropDownListFor(m => m.ddlprop)
                            .DataTextField("Text")
                            .DataValueField("Value")
                            .BindTo(Model.ddlOptions )
                            )
<input type="submit"
value="save" />
}

namespace ViewModels
{

  public class DdlVM
    {    public List<SelectListItem> ddlOptions { get; set; }

     public string ddlprop{ get; set; }

}

}

controller

  public ActionResult ClickMe()
        {
            DdlVM testvm = new DdlVM();
            testvm.ddlOptions = new List<SelectListItem>();
            for (int i = 0; i < 100; i++)
            {
                testvm.ddlOptions.Add(new SelectListItem()
                {
                    Text = "TAB- " + i.ToString(),
                    Value = i.ToString()
                });
            }
            return View("TestClickMe", testvm);
        }
        [HttpPost]
        public ActionResult ClickMe(DdlVM testvm)
        {
            testvm.DelimiterOptions = new List<SelectListItem>();
            for (int i = 0; i < 100; i++)
            {
                testvm.ddlOptions.Add(new SelectListItem()
                {
                    Text = "TAB- " + i.ToString(),
                    Value = i.ToString(),
                    Selected = testvm.ddlprop== i.ToString()
                });
            }
            return View("TestClickMe", testvm);
            #endregion
        }

 

Boyan Dimitrov
Telerik team
 answered on 15 Aug 2016
3 answers
105 views
Greetings, I ran into a problem using kendo mobile with angular, if I place a combo-box inside a list-view, the css of the combo is broken, is there any solution or workaround for this?.
Im attaching dojo example of the case: http://dojo.telerik.com/uJanA
Thanks in advance.
Petyo
Telerik team
 answered on 15 Aug 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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?