Telerik Forums
Kendo UI for jQuery Forum
7 answers
250 views

Hello, 

We have a grid that row mode filter is enabled and data source model has a field that has type as object. After we used the 2017 r2 release this grid is not loading correctly. Below you can find a sample code block that demonstrates this issue on dojo.

function renderStores(stores) {
    if (typeof stores != "undefined" && stores != null) {
        var template = "<ol>";
        for (var i = 0; i < stores.length; i++)
            template = template + "<li>" + stores[i] + "</li>";
        return template + "</ol>";
    } else {
        return "";
    }
}
$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: {
            data: products,
            schema: {
                model: {
                    fields: {
                        ProductName: {
                            type: "string"
                        },
                        UnitPrice: {
                            type: "number"
                        },
                        UnitsInStock: {
                            type: "number"
                        },
                        Discontinued: {
                            type: "boolean"
                        },
                        Stores: {
                            type: "object"
                        }
                    }
                }
            },
            pageSize: 20
        },
        height: 550,
        scrollable: true,
        sortable: true,
        filterable: {
            mode: "row"
        },
        pageable: {
            input: true,
            numeric: false
        },
        columns: [
            "ProductName",
            {
                field: "UnitPrice",
                title: "Unit Price",
                format: "{0:c}"
            },
            {
                field: "UnitsInStock",
                title: "Units In Stock"
            },
            {
                field: "Discontinued"
            },
            {
                field: "Stores",
                template: "#=renderStores(Stores)#",
                filterable: {
                    cell: {
                        template: function (args) {
                            console.log(args.element);
                        }
                    }
                }
            }
        ]
    });
});
var products = [{
    ProductID: 1,
    ProductName: "Chai",
    SupplierID: 1,
    CategoryID: 1,
    QuantityPerUnit: "10 boxes x 20 bags",
    UnitPrice: 18.0000,
    UnitsInStock: 39,
    UnitsOnOrder: 0,
    ReorderLevel: 10,
    Discontinued: false,
    Category: {
        CategoryID: 1,
        CategoryName: "Beverages",
        Description: "Soft drinks, coffees, teas, beers, and ales"
    },
    Stores: ["Store 1", "Store 2", "Store 3"]
}, {
    ProductID: 2,
    ProductName: "Chang",
    SupplierID: 1,
    CategoryID: 1,
    QuantityPerUnit: "24 - 12 oz bottles",
    UnitPrice: 19.0000,
    UnitsInStock: 17,
    UnitsOnOrder: 40,
    ReorderLevel: 25,
    Discontinued: false,
    Category: {
        CategoryID: 1,
        CategoryName: "Beverages",
        Description: "Soft drinks, coffees, teas, beers, and ales"
    },
    Stores: ["Store 1", "Store 2", "Store 3"]
}, {
    ProductID: 3,
    ProductName: "Aniseed Syrup",
    SupplierID: 1,
    CategoryID: 2,
    QuantityPerUnit: "12 - 550 ml bottles",
    UnitPrice: 10.0000,
    UnitsInStock: 13,
    UnitsOnOrder: 70,
    ReorderLevel: 25,
    Discontinued: false,
    Category: {
        CategoryID: 2,
        CategoryName: "Condiments",
        Description: "Sweet and savory sauces, relishes, spreads, and seasonings"
    },
    Stores: ["Store 1", "Store 2", "Store 3"]
}];

What is the correct way to fix this issue?
Regards.

Konstantin Dikov
Telerik team
 answered on 24 Jul 2017
3 answers
407 views

I have a diagram where I change the height from javascript on page resize like so:

$("#diagram").height(xxx);

When I call this, the height is applied as I can see the diagram's border cover the larger area.  This works fine when resizing the browser window by dragging a corner to resize. However, when I maximize the window, the diagram resizes, however the content in the lower part of the diagram remains hidden.

For example,if when I maximize the browser, the diagram becomes 100 pixels taller, the bottom 100 pixels of the diagram is empty - I cannot even drag shapes into that area.  If I resize via dragging the browser corner, it fixes itself again.

I attached screenshots that describe the behavior.

Is their any workaround you can think of?

 

 

 

Stamo Gochev
Telerik team
 answered on 24 Jul 2017
3 answers
407 views

I want to change the dots to how many else events in that day ,show like one more event will show +1

How to do that?

Ivan Danchev
Telerik team
 answered on 24 Jul 2017
2 answers
260 views

Hi,

May i know how can i loop the series data in JQuery Kendo Chart? I need to loop because i need to check if the series point exceed some limit and i need to change the behavior of the point by changing it label or color. i know there is a parameter called render and we can check the value there.

Sharizan
Top achievements
Rank 1
 answered on 24 Jul 2017
3 answers
574 views

Hi team,

I'm wondering if there is a way to pop-up a notification dialog on Kendo Window closing to warn user about unsaved changes, and allow them to choose between continue closing anyway and undo the closing command so they can save their change? Just like the Page Close Notification dialog?

 

Best,

 

Anna

Anna
Top achievements
Rank 1
 answered on 21 Jul 2017
2 answers
239 views

Is there a easy way to disable spinners for numeric textbox?

Somenthing like:

spinners: false

 

Ricardo Lavor
Top achievements
Rank 1
 answered on 21 Jul 2017
5 answers
268 views

I have a cell with the text "Buy X for, get Y for: Buy 1 for, get 1 for x".

When I drag and drop this cell, the spreadsheet manipulates the text inside it and increments the last number by 1.

The result is 

Buy X for, get Y for: Buy 1 for, get 2 for x
Buy X for, get Y for: Buy 1 for, get 3 for x
Buy X for, get Y for: Buy 1 for, get 4 for x
Buy X for, get Y for: Buy 1 for, get 5 for x

The field type is string so this cannot be correct.

Please investigate and let me know

 

 

Dimitar
Telerik team
 answered on 21 Jul 2017
1 answer
526 views

We currently filter some MVC grids on the client (this works well for us) however a new requirement is to filter on a value in ONE column, and if value appears in a set of other columns.

E.G. 

A + (B or C or D)

current we filter like this on the "A" column 

grid.dataSource.filter({
       logic: "or",
      filters: [
          { field: "SkillStatus", operator: "contains", value: "D" }
          ]
});

and this is how we filter on the B,C & D columns 

grid.dataSource.filter({
                logic: "or",
                filters: [
                    { field: "SkillName", operator: "contains", value: val },
                    { field: "SkillCode", operator: "contains", value: val },
   
                { field: "SkillDesc", operator: "contains", value: val },

                    ]
            });

Is there a way to apply both these filters to one grid, such that 

A   | B   | C    | D   |
1   | X    | Y    | X   |
1   | Y    | X    | X   |
2   | Z    | Z    | Z   |
2   | Y    | Y    | Z   |

A = 1 , "Other Value" = X  returns
A   | B   | C    | D   |

1   | X    | Y    | X   |
1   | Y    | X    | X   |

A = 1 , "Other Value" = Z  returns
A   | B   | C    | D   |

(no records)

A = 2 , "Other Value" = Z  returns

A   | B   | C    | D   |
2   | Z    | Z    | Z   |
2   | Y    | Y    | Z   |

A = 2 , "Other Value" = X  returns
A   | B   | C    | D   |

(no records)

Georgi
Telerik team
 answered on 21 Jul 2017
2 answers
578 views

Hi,

I have a chart with big checkboxes for mobile. 

Unfortunately it takes a lot of space on my chart so I'd like to reduce the gap between each legends. (see screenshot).

I tried to change legend.label.margin = 0 and legend.label.padding = 0, without success.

 

The code to generate my legend looks like this:

"legend": {
                    "position": "bottom",
                    "labels": {
                        "color": "#5d707c",
                        "font": title_legend_font_size,
                        "margin": 0,
                        "padding": 0,
                    },
                    "item": {
                        visual: function(e) {
                            var color = e.options.markers.background;
                            var labelColor = e.options.labels.color;
                            var rect = new kendo.geometry.Rect([0, 0], [350, 100]);
                            var layout = new kendo.drawing.Layout(rect, {
                                spacing: 5,
                                alignItems: "center"
                            });
                            var cbSymbol = e.active ? "☑" : "☐";
                            var cb = new kendo.drawing.Text(cbSymbol, [0, 0], {
                                fill: {
                                    color: labelColor
                                },
                                font: checkbox_font_size
                            });
                            var defaultVisual = e.createVisual();
                            layout.append(cb, defaultVisual);
                            layout.reflow()
                            return layout;
                        }
                    }
                },

 

Stamo Gochev
Telerik team
 answered on 21 Jul 2017
2 answers
414 views
Hii all
i making custom popup editor with customize width, so my problem is a window not in center, but widen to right
this my code :
...
editable: { mode: "popup", template: $("#popup_brand").html() },
        edit: function(e) {
            $(e.container).parent().css({
                width: 900
            });
        },

so, how to make that template window into the center.

Thank
Orlin
Telerik team
 answered on 21 Jul 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
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?