Telerik Forums
Kendo UI for jQuery Forum
3 answers
450 views

 This is my first question on kendo ui grid, we are using kendo ui grid on mobile device.

I have trouble to make it support both multiple selection and scrolling.

It has grid setup with

selectable: "multiple, row",

pageable: false

navigatable: false

 

As a user, I would expect user to touch scroll the grid, rather than select and stop scrolling, which made it unusable.

Is there any way to configure it to support multiple selection and scrolling at the same time?

- click to select and unselect

- scrolling when touch and move

- not keyboard in this case

Thanks in advance.

 

Viktor Tachev
Telerik team
 answered on 10 Apr 2017
3 answers
146 views

 Hi, 

 The first week of January is looking to be 2, not 1. What can  be the explanation? 

 

Regards, 

   Cristina

 

 

 

 

Boyan Dimitrov
Telerik team
 answered on 10 Apr 2017
3 answers
238 views

Why does Bounds() always return 1 pixel more than the actual width and height?

Check out: http://dojo.telerik.com/@Harold@/Ivacu

var shape = new kendo.dataviz.diagram.Shape({ type: "rectangle", x: 0, y: 0, width: 1150, height: 1150, fill: "blue" });
    
alert("bounds().width = " + shape.bounds().width);

Result:

bounds().width = 1151

Tsvetina
Telerik team
 answered on 10 Apr 2017
1 answer
278 views

Hello,

I would like to use a ComBobox without loading the entire option's list. The ComboBox must also be filterable.

I tested 2 approaches:
- In MVC, I did not find the Virtual attribute MapValueTo dataItem and it crashes to the loading
- In JS, it crashes when the selected value is not in loaded options

Where am I wrong?

 

Controller:

public class ContactController
{
    var Manager = new ContactManager();
        public virtual ActionResult _List([DataSourceRequest] DataSourceRequest request)
        {
            var result = Manager
                .Enables()
                .UseAsDataSource()
                .For<ContactListViewModel>()
                .OrderBy(p => p.Fullname);
            return Json(result.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
        public virtual ActionResult _Get(int? id)
        {
            var result = new List<ContactListViewModel>();
            if (id.HasValue)
            {
                var model = Manager.Find(id);
                result.Add(Mapper.Map<ContactListViewModel>(model));
            }
            return Json(result, JsonRequestBehavior.AllowGet);
        }
}

 

Razor version:

@(Html.Kendo().ComboBoxFor(model => model)
    .Name(propertyName)
    .DataTextField("Fullname")
    .DataValueField("ContactId")
    .Placeholder(" ")
    .HtmlAttributes(editorHtmlAttributes)
    .Filter("contains")
    .Height(200)
    .DataSource(dataSource => dataSource.Custom()
        .ServerFiltering(true)
        .ServerPaging(true)
        .PageSize(80)
        .Type("aspnetmvc-ajax")
        .Transport(transport =>
        {
            transport.Read("_List", "Contact");
        })
        .Schema(schema =>
        {
            schema
                .Errors("Errors")
                .Data("Data")
                .Total("Total");
        })
    )
    .Virtual(v => v.ItemHeight(26).ValueMapper("contactValueMapper"))
)
<script>
    function contactValueMapper(options) {
        $.ajax({
            url: "@Url.Action("_Get", "Contact")",
            data: { id: options.value },
            success: function (dataItems) {
                options.success(dataItems);
            }
        });
    }
</script>

Error onload:

Uncaught TypeError: Cannot read property 'length' of undefined
    at kendo.all.js:7288
    at Object.n.success (kendo.all.js:5583)
    at fire (jquery-1.10.2.js:3062)
    at Object.fireWith [as resolveWith] (jquery-1.10.2.js:3174)
    at done (jquery-1.10.2.js:8249)
    at XMLHttpRequest.callback (jquery-1.10.2.js:8792)

 

JavaScript version:

<input id="@propertyName" name="@propertyName" value="@(Model.HasValue ? Model.ToString() : "")" />
 
<script>
    function contactValueMapper(options) {
        $.ajax({
            url: "@Url.Action("_Get", "Home", new { area = "Contact" })",
            data: { id: options.value },
            success: function (dataItems) {
                options.success(dataItems);
            }
        });
    }
 
    $(function () {
 
        $("#ContactProfileId").kendoComboBox({
            "dataSource": {
                "type": "aspnetmvc-ajax",
                "transport": {
                    "read": {
                        "url": "@Url.Action("_List", "Home", new { area = "Contact" })"
                    }
                },
                "pageSize": 80,
                "page": 0,
                "total": 0,
                "serverPaging": true,
                "serverFiltering": true,
                "filter": [],
                "schema": {
                    "data": "Data",
                    "total": "Total",
                    "errors": "Errors"
                }
            },
            "dataTextField": "Fullname",
            "filter": "contains",
            "height": 200,
            "virtual": {
                "mapValueTo": "dataItem",
                "valueMapper": contactValueMapper,
                "itemHeight": 26
            },
            "dataValueField": "ContactProfileId",
            "placeholder": ""
        });
    });
</script>

Error

Uncaught TypeError: Cannot read property 'index' of undefined
    at init._getElementByDataItem (kendo.all.js:80207)
    at init._deselect (kendo.all.js:80554)
    at init.select (kendo.all.js:80144)
    at init._select (kendo.all.js:32418)
    at init._click (kendo.all.js:32579)
    at init.proxy (jquery-1.10.2.js:841)
    at init.trigger (kendo.all.js:124)
    at init._clickHandler (kendo.all.js:80686)
    at HTMLLIElement.proxy (jquery-1.10.2.js:841)
    at HTMLUListElement.dispatch (jquery-1.10.2.js:5109)

 

Thank you for your answer
Nencho
Telerik team
 answered on 10 Apr 2017
1 answer
461 views

http://dojo.telerik.com/iZope/2

 

Using the above dojo filter the grid to Feb 10, 2016 and click "delete me".  The data in the grid disappears.  Why?  If you clear the filters then the data appears.

Our requirement is to use a json data object which is set to the datasource and allow the user to use the grid filters as well as external buttons that get new data, set it on the datasource and refresh the datasource.  All of this works fine until they use the grid filters then any refresh causes the grid to be blank.

 

Thanks for any help you can give.

Jason
Top achievements
Rank 1
 answered on 10 Apr 2017
1 answer
474 views

I used kendoui Grid and external filter using input box for search keyword.

I want to apply some style(ex. color: blue) to keywords in cells of kendoUI grid filtered by keyword in input box.

    var q = iptManagerSearch.val(); // keyword value by user input
    var grid = gridManagerUI.data("kendoGrid");
    grid.dataSource.filter({
        // page: 1,
        // pageSize: 20,
        logic: "or",
        filters: [ // fields to be applied keyword from users input
            {field:"ums_groups_name", operator:"contains", value:q},
            {field:"name", operator:"contains", value:q},
            {field:"id", operator:"contains", value:q},
            {field:"organization", operator:"contains", value:q},
            {field:"position", operator:"contains", value:q},
            {field:"responsibility", operator:"contains", value:q},
            {field:"mobilePhoneNumber", operator:"contains", value:q},
            {field:"lastLogin", operator:"contains", value:q},
            {field:"lastEntry", operator:"contains", value:q}
        ]
    });

 

I did filter my grid by user's input.

after that I want to make all keywords( that matched with user's input keyword ) in each cell has 'color: blue'

 

How can I access style of keywords  in cells of filtered grid. In case of my code, value is 'q'.

 

Thanks

Viktor Tachev
Telerik team
 answered on 10 Apr 2017
2 answers
338 views

I've implemented a DropDownList in a custom editor for a Grid column as follows.

                    $("#control").kendoGrid({
                        dataSource: controlDs,
                        editable: true,
                        saveChanges: function (e) {
                            if (!confirm("Are you sure you wish to save changes?")) {
                                e.preventDefault();
                            }
                        },
                        toolbar: ["save","cancel"],
                        sortable: true,
                        columns: [
                                {
                                    title: "Artifacts",
                                    headerAttributes: {
                                        style: "font-size: 10pt; font-weight: 600; text-align: center;"
                                    },
                                    columns: [
                                        {
                                            field: "family",
                                            editor: customDropDownEditor,
                                            headerAttributes: {
                                                style: "font-size: 10pt; font-weight: 600;"
                                            },
                                            title: "Family",
                                            width: 120
                                        },
                                        {
                                            field: "artifact",
                                            editable: function (dataItem) {
                                                return false;
                                            },
                                            headerAttributes: {
                                                style: "font-size: 10pt; font-weight: 600;"
                                            },
                                            title: "Artifact",
                                            template: '<a href="#=artifact#" target="_blank">#=title#</a>'
                                        }
                                    ]
                                }
                            ]
                    });

                function customDropDownEditor(container, options) {
                    $('<input required name="' + options.field + '"/>')
                        .appendTo(container)
                        .kendoDropDownList({
                            autoBind: false,
                            dataSource: ["one", "two", "three", "four"]
                        });
                }

This works perfectly. Now, how do I attach a ToolTip widget to the items in this DropDownList?

Thanks in advance.

Ianko
Telerik team
 answered on 10 Apr 2017
4 answers
995 views

I am wondering if it is possible to group resources vertically that are not part of the scheduler resources... 

I saw that I can specify 'group: {orientation: 'vertical', resources: ['OwnerName']}' in my timeline view that I want this displayed this way in, which utilizes the 'text' field of all the javascript objects in my resource named 'OwnerName', which is the resource list that is set to my scheduler resources option.

 

However, my scheduler resources have items that I don't want shown on my timeline grouping (like groups and various rooms). I only want the users from the list, so tried creating a new resource item and setting my group:{resources: newResource} but nothing happened.

 

How can I apply vertical grouping of resources, but use a custom resource item that is not the resources of the scheduler?

Nencho
Telerik team
 answered on 10 Apr 2017
7 answers
860 views
I would like to change page size of DataSource depends on my needs. However when I'm setting:
DataSource.pageSize(10);
it is causing that data is read from server.

I would like to prevent such behaviour and read data from server only on read method, how to achieve that?

Similar issue is with page method. From time to time it causes read with initial settings so it reads data twice. with diferent params. when I comment out DataSource.page(1); everthing is working.

I also realize that this is happening if there is no data when I calling this methods. If there is data there is no read action.
Alex Hajigeorgieva
Telerik team
 answered on 10 Apr 2017
2 answers
340 views

When the user clicks in a certain column, we make it into a dropdown (using range.validation(String here). We have to do this because there are over 10,000 rows and adding different validations to each takes too long.

However - we also have an onchange method, which fires when this dropdown (validation) is added as technically the cell value has changed (from the original value, to the new value which is the same as the original, but part of a validation). Is there any way to stop this event firing? Thanks!

Marc
Top achievements
Rank 1
 answered on 10 Apr 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
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
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
+? 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?