Telerik Forums
Kendo UI for jQuery Forum
3 answers
898 views

I'm calling options.error() in my destroy function but the row is removed anyway. How to prevent that ?

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Untitled</title>
 
 
<body>
  <div class='grid'><div>
    <script>
      $(".grid").kendoGrid({
        editable:
        {
          mode: "inline",
          confirmation: false
        },
        dataSource:
        {
          transport:
          {
            read: options =>
            {
              options.success([{test: "test", id: 1}]);
            },
            destroy: options =>{
              options.error("error")
            }
          },
          schema:
          {
            model:
            {
              id: "id"
            }
          }
        },
        columns:
        [{
          field: "test"
        },
         {
           command: ["destroy"]
         }]
      })
    </script>
</body>
</html>
Stefan
Telerik team
 answered on 18 Apr 2018
2 answers
291 views

Hi All!

 

There is a UI issue with kendo grd's vertical scroll width into different browsers.

Vertical scroll's width into Safari/Edge is more narrow than into Chrome for example.

I've seen an idea for removing vertical scroll but I can't use this approach because I have a custom icon-button in the very right-top angle of the grid for 'expand all columns' function (see attachment).

Please help, is it possible to set the same vertical scroll width for Edge/Safri browsers as we have for Chrome browser?..

I've attached two screenshots to visualize my question.

Vladimir
Top achievements
Rank 1
 answered on 18 Apr 2018
4 answers
1.1K+ views
I'm trying to control the width of the options displayed in the page sizes part of the pager (used in conjunction with a listview). Right now they seem to be driven by the width of the k-input holding the page-sizes value. The problem is that we have customized the design of our dropdowns to be wider and more spacious, but the options for the page sizes do not reflect that width (yet, this works for explicit dropdownlist widgets) and I can't seem to find a way to control their width. Can you recommend a way (css classes or other properties) to control that?
Chris
Top achievements
Rank 1
Iron
 answered on 17 Apr 2018
1 answer
7.0K+ views

I'm giving custom templates option in kendo select drop down where I need to sort the values ie., here names in ascending or descending order.

Here is my code in customOptions

 

            $scope.customOptions = {
                placeholder: "Select employee...",
                valuePrimitive: true,
                autoBind: false,
                 itemTemplate: '<span class="k-state-default">' +
                '<img src="#:data.imagePath#" alt="edit" width="24px" height= "24px" /></span>' +
                '</span>&nbsp;&nbsp;' +
                '<span class="k-state-default" >#: data.name #</span>',
                tagTemplate: '<span class="selected-value">' +
                '<img src="#:data.imagePath#" alt="edit" width="24px" height= "24px" /></span>' +
                '</span>' +
                '<span>#:data.name#</span>'
            }

 

I tried to give k-sort='asc' in my select dropdown but it didn't worked out..

 <select class="employeeMultiSelect " kendo-multi-select k-ng-model="selectedEmployees" k-data-text-field="'name'"
                k-data-value-field="'id'" k-data-source="employeeList" k-options="customOptions" k-sort='asc'
                k-rebind="customOptions"></select>

 

Tom Daria
Top achievements
Rank 1
 answered on 17 Apr 2018
3 answers
327 views

I'm trying to create an event on right click and drag.

I was able to create an event on right click itself but not able to do so while clicking and dragging of the right mouse button 

I have also applied restriction to events that no event can overlap each other. The problem I'm facing is whenever I click the first right click doesn't create event "Maintenance" from next click onward the event multiplies itself on click and event the right click event doesn't go with the restriction of overlapping also.

My Example

I did try referencing this example also
Refrence Example

Plamen
Telerik team
 answered on 17 Apr 2018
1 answer
296 views

Here is my example code(Delete):

destroy: {
type: 'post',
url: base_url + "delete",
dataType: "json",
contentType: 'application/json; charset=utf-8',

complete: function (jqXhr, data) {

if (jqXhr.responseJSON.success) {
}
else {
}

alert(jqXhr.responseJSON.msg)

console.log(jqXhr, data)

return false;

}

My response json : {"id":null,"success":false,"msg":"操作失败!","response":null}

 

PLS help.

 

Konstantin Dikov
Telerik team
 answered on 17 Apr 2018
5 answers
383 views

Hello:

We are currently evaluating Kendo UI. Our application displays data to end users in two views - a tile view and a tabular view. Users have the ability to slice and dice data using filters in the tile view. We have a use case where users switch from grid view to tabular view and expect that the filters set in the tile view are persisted to tabular view.

We envision tabular view to consist of KendoGrid with multi-select controls as the column headers where users can filter the data. When initializing the grid, we would like to parse the query string variables and convert them to filter object and apply them to multi-select controls and the grid. My question: is it possible to initialize multi-select control and set its value at the time of initialization programmatically? 

Thanks,

James

Neli
Telerik team
 answered on 16 Apr 2018
1 answer
279 views

Hi,

I have Multiple Column and Rows fields.

  • Column: Year (i.e 2018, stored as a int (tried DateTime and String also) and Month (i.e April, stored as DateTime)
  • Row: Name (i.e. Lee Stevens, stored as String) and Charge Type (i.e. Annual Leave, stored as String)

Now, when i sort ONLY the columns OR row, the results display as they should but when i want to Sort from both it "can't" I guess and gives up.

 

For example when i sort the Column (Year, Month)

sort: [
    {
        field: "Year",
        dir: "desc" //or asc
    },
    {
        field: "Month",
        dir: "asc" //or asc
    }
]

This work perfectly fine, It display the Year(s) (i.e. 2018, 2017, 2016) then the Months in order (I.e. Jan, Feb, March)

 

But as soon as i introduce the sorting the row also they then stop ordering correctly:

sort: [
    {
        field: "FullName",
        dir: "asc" //or asc
    },
    {
        field: "Year",
        dir: "desc" //or asc
    },
    {
        field: "Month",
        dir: "asc" //or asc
    }
]

The order becomes: 2017, 2019, 2018. Nov, Dec, April, Jan (they seem to loose there sorting?)

Any ideas?

Thanks,
Lee.

Konstantin Dikov
Telerik team
 answered on 16 Apr 2018
8 answers
3.0K+ views

There is a date constellation for which the datetimepicker returns null. This example is based on your documentation and just enhanced to show the effect:

<!DOCTYPE html>
<html lang="en">
 
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
 
        <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
 
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.3.1026/styles/kendo.common.min.css" />
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.3.1026/styles/kendo.blueopal.min.css" />
 
        <script src="http://kendo.cdn.telerik.com/2017.3.1026/js/jquery.min.js"></script>
        <script src="http://kendo.cdn.telerik.com/2017.3.1026/js/kendo.all.min.js"></script>
    </head>
 
    <body>
        <input id="datetimepicker" />
    </body>
 
    <script>
        $("#datetimepicker").kendoDateTimePicker({
            change: function () {
                console.log (this.value());
            }
        });
 
        var datetimepicker = $("#datetimepicker").data("kendoDateTimePicker");
 
        datetimepicker.min(new Date(2018, 0, 1));
    </script>
</html>

 

It allows you to choose a date only equal or bigger than 1th of January 2018. That is working fine choosing from datetimepicker. Now proceed with this:

1. Use/start code above
2. Open Browser console
3. Chose date 1th of January 2018 from datetimepicker (it will be set in the input field, fine)
    => You will see the proper date/time in the console
4. Click into input field of datetimepicker and change the year to 2017
5. Click key 'Tab' to leave the input field to make the change trigger fire
    => You will see 'null' in the console!

It looks like the datetimepicker can't handle manually changed date/time in the input field lower than the set min(date).
In such a case I would expect the datetimepicker Widget would set back a previously set (valid) date or at least returning the set date even if it's lower than the min date. As a programmer I can't work with 'null' in such a case (it also could mean the date was deleted manually). Of course I could previously store any set date and in case of 'null' set that one back but I think this is not the idea. I also made a check with the 'max' option that ended up with the same behaviour.

Tayger
Top achievements
Rank 1
Iron
Iron
 answered on 15 Apr 2018
1 answer
397 views

Hello.

I have 130k+ cells in my spreadsheet and if I load all those cells with validation my grid takes a lot longer to load. (Something around 8-12 seconds), so I decided to not use validation. 

 

Is there any other way to only allow float numbers in my cells? I'm down to use an 'on-change' trick or something like that.

 

 

Thank you

Veselin Tsvetanov
Telerik team
 answered on 13 Apr 2018
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
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?