Telerik Forums
Kendo UI for jQuery Forum
2 answers
94 views
I'm developing our first Kendo Mobile app and run into an issue with Safari in iOS7. 

When I perform a $.ajax request (see below) to verify the usercredentials, the iPhone/iPad Network Activity Indicator starts spinning and does not stop. The indicator even keeps spinning after I shutdown webpage with the Kendo app. I have to remove the websitedata via the Settings menu to stop the Indicator from spinning.

          var request = $.ajax({
            url: webapiEndpoint() + '/authenticate/login?' + urlParameters,
            type: 'GET',
            contentType: "application/json",
            data: '',
            dataType: 'json',
            processData: false
         });

         request.done(function ( data ) {
            app.navigate(activePage);
         });

         request.fail(function ( error ) {
            app.navigate(loginPage);
         });

The $ajax request receives the correct response from the WebApi and shows the appropriate page. Are you aware of any issue with iOS7 Safari that causes this strange behavior? Other $.ajax requests result in the same issue, so it is not this specific request that is causing the problem.









Remco
Top achievements
Rank 1
 answered on 21 May 2014
1 answer
277 views
Using Kendo UI Mobile, what is the best way to allow a user to specify a duration such as an hour and thirty minutes.  I would like to give them something similar to the time form input but without the AM/PM designation.  Is this possible or is there a better way?

Thanks
Kiril Nikolov
Telerik team
 answered on 21 May 2014
5 answers
235 views
Hi ,

1)
When I set the Width of AutoSelect  in below demo for State filed;  it does also changing auto search filter  on column. Can you guys please suggest a solution.
And Autoselect for State field width not looking same in all browsers. In IE9 Autoselect width looks similar to  all other fields in the form. But when we take it on Chrome "State" field looks much bigger.

2) And also can you help in validating Autoselect  for State field.I   am trying to clear the Autoselect field when non existing datavalue is typed in the State field but that is not working. Can you please help.
//create AutoComplete UI component
                      $("#State").kendoAutoComplete({
                          dataTextField: "text",
                          dataValueField: "value",
                          open: function (e) {
                              valid = false;
                          },
                          select: function (e) {
                              valid = true;
                          },
                          close: function (e) {
                              // if no valid selection - clear input
                              if (!valid) this.value('');
                          },
                          dataSource: autoCompleteStates,
                          placeholder: "Select States..."
                      });
Note: Demo doesn't have Scripts (Kendo/Js) included.

Thanks,
Chatrapathi Chennam
Petur Subev
Telerik team
 answered on 21 May 2014
1 answer
515 views
Hello,

This error is happening quite frequently across all three browsers on a ASP.NET MVC Kendo Grid we use. I attempted to wrap any javascript functions we wrote that interact with the kendo controls in document ready but it did not make any difference. Sample code is below:

@Html.HiddenFor(m => m.CustomerTypesQuery)
                @(Html.Kendo().Grid<SelectListItem>()
                        .Name("CustomerTypes")
                        .HtmlAttributes(new { style = "width: 100%; height: 165px;" })
                        .Columns(columns =>
                                        {
                                            columns.Bound(p => p.Value).Hidden();
                                            columns.Bound(p => p.Text).Title("Customers");
                                        })
                        .Scrollable()
                        .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple))
                        .DataSource(dataSource => dataSource
                                                              .Ajax()
                                                              .Read(read => read.Action("ReadCustomerTypes", "Search"))
                                                              .Model(m => m.Id(p => p.Value))
                      )
                        .Events(events => events.Change("CustomerTypesChange").DataBound("CustomerTypesDataBound"))
                )

                <script type="text/javascript">
                    function CustomerTypesChange() {
                        var grid = $('#CustomerTypes').data('kendoGrid');
                        var rows = grid.select();
                        $('#CustomerTypesQuery').val('');
                        rows.each(
                            function () {
                                var record = grid.dataItem($(this));
                                $('#CustomerTypesQuery').val($('#CustomerTypesQuery').val() + record.Value + ",");

                            }
                        );
                        $('#CustomerTypesQuery').val($('#CustomerTypesQuery').val().replace(/,$/, ''));
                         //posts a form to the server
                         submitAjaxForm();
                    }

                    function CustomerTypesDataBound() {
                        filterHiddenFieldDataBound.call(this, 'CustomerTypesQuery');
                    }

        //wrapping any fo these interactions wit document ready does not help
        var filterHiddenFieldDataBound = function(hiddenfield) {
        var hiddenfieldId = '#' + hiddenfield;
        var grid = this;
        var dataSource = this.dataSource;
        var matchedItems = new Array();
        var value = $(hiddenfieldId).val();
        if (value) {
            $.each(value.split(','), function() {
                var item = dataSource.get(this);
                if (item) {
                    var row = grid.tbody.find('[data-uid=' + item.uid + ']');
                    row.addClass('k-state-selected');
                    matchedItems.push(this);
                }
            });
            $(hiddenfieldId).val(matchedItems.toString());
        }
    };
 </script>

I attempted to wrap functions that called the .value() method of kendo in document ready as per http://www.telerik.com/forums/cannot-call-method-%27value%27-of-kendodropdownlist-before-it-is-initialised-error#dhl__nLrG0GvjpwmSeI5PQ but this did not help
We are using kendo version 2014.1.318 but even attempting to upgrade to  2014.1.416 did not fix this issue. I know this is a kendo grid example but the error is being thrown on the kendo drop down list component of the kendo library so I thought this section would be appropriate.
Georgi Krustev
Telerik team
 answered on 21 May 2014
1 answer
415 views
Hello. 

I'm trying to add a button to upload an image in the grid. The problem is when the row is "saved". All elements of the file are stored, but the byte [] (picture) never reaches the controller.

He conseguido rellenar el grid mediante javascript





But when i try to save, the object received controller is empty in field img



@(Html.Kendo().Grid<InventarioMerlin.Models.ContadorModelo>()
    .Name("GridContadorModelo")
    .Columns(columns =>
    {
        columns.Bound(p => p.id).Visible(false).Width(100);
        columns.Bound(p => p.nombre).Width(100);
        columns.Bound(p => p.isenabled).Width(100);
        columns.Bound(p => p.img).Width(100);
        columns.Command(c => c.Custom("Upload").Click("upload")).Title("Grafica").Width(100);
        columns.Bound(p => p.grafica).Width(100);
        
        columns.Command(command => { command.Edit(); }).Width(200);
    })
                    .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable(p => p.Refresh(true))
    .Sortable()
    .Scrollable()
    .HtmlAttributes(new { style = "height:100%;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)    
        .Events(events => events
            .Error("error_handler")
            .RequestEnd("onRequestEnd"))
            .Model(model =>
                        {
                            model.Field(p => p.img).Editable(true);
                            model.Id(p => p.id);
                            model.Field(p => p.id).Editable(false);
                            model.Field(p => p.isenabled).DefaultValue(true);
                        })
            .Create(create => create.Action("ContadorModelo_Popup_Create", "Contador"))
            .Read(read => read.Action("ContadorModelo_Popup_Read", "Contador"))
            .Update(update => update.Action("ContadorModelo_Popup_Update", "Contador"))
            //.Destroy(update => update.Action("EditingPopup_Destroy", "Ccoconfiguraciones"))
    )
        )
 
 
 
function upload(e)
    {
         
        e.preventDefault();
        rowSelected = this.dataItem($(e.currentTarget).closest("tr"));
       
        $('#myModal').modal({
            show: true
        })
 
        
    }
 
 $("#btnSaveChanges").click(function () {
        refreshGrid();
        $('#myModal').modal('hide');
    });
 
 
function refreshGrid()
    {
        var grid = $("#GridContadorModelo").data("kendoGrid");
        var dataSource = grid.dataSource;
        var data = dataSource.data();
        $.each(data, function (index, rowItem) {
            if (rowItem.id == rowSelected.id) {
                rowItem.img = imageUploaded;
                rowSelected.dirty = true;
            }
        });
        grid.refresh();
         
    }


Daniel
Telerik team
 answered on 21 May 2014
1 answer
204 views
Hi
  Can you use the DropDownList on the mobile? 

 http://trykendoui.telerik.com/ICoJ

I want to use a DropDown on a site where I am using mobile controls, hence I need to include the mobile.css and js.
As you can see from the example the styling is wrong. This also applies to the Editor control. 

Do I need to include files in a specific order?

thanks


  
Kamen Bundev
Telerik team
 answered on 21 May 2014
2 answers
131 views
Hi,

I have seen this documentation about how to turn the drop zone visible. I wanted the user to know where he could drop his files so I changed the style to a div with a visible gray dashed border.
However, I would like this border to turn black whenever a file is being dragged. It will give a better feedback to the user to where he has to drop the file.

I know this is possible because in the default configuration, the drop zone is invisible and turns visible whenever a file is being dragged in the window.

So long story short, what function is triggered when dragging occurs?

Thanks for your help!

Alex
Masaab
Top achievements
Rank 1
 answered on 21 May 2014
1 answer
112 views
I would like to use a TabStrip to break up the fields in a popup edit form from the Scheduler widget. Will this work?

So far my test of putting the Basic TabStrip samples <div id="forecast">...</div> into a working edit template throws a content error.

Roderick Prince
Top achievements
Rank 1
 answered on 20 May 2014
2 answers
157 views

I have an area type stock chart showing three series. I am trying to set the colors for the series, but it is not showing my colors. It seems that it takes the last series color I specify, it approximates it (badly, pinkish color instead of red), and then approximates the other two based on the last one, not based on the specified values.
Attached is the image showing the colors I am getting, instead of plain blue, yellow, and red.

What is happening?


$stockChart.kendoStockChart({
    theme: global.app.chartsTheme,
    renderAs: "svg",
    dataSource: loanInterestDataSource,
    title: {
        position: "top",
        text: "The Boeing Company (NYSE:BA)"
    },
    chartArea: {
        background: "",
        width: $(window).width(),
        margin: app.emToPx(1)
    },
    seriesColors: ["#0000ff", "#ffff00","#ff0000"],
    dateField: "Date",
     
    series: [
        {
            type: "area",
            field: "Frnt"
        },
        {
            type: "area",
            field: "Intr"
        },
        {
            type: "area",
            field: "Fees"
        }
    ],
    navigator: {
        series: {
            type: "area",
            field: "Intr"
        }
    }
});
Alex
Top achievements
Rank 1
 answered on 20 May 2014
3 answers
231 views
help.

there is a problem I RTL and Spinners off for NumericTextBox. im using the lest version  on Kendo UI.
see attach image:
the code:
​
<head>
    <title>RTL Kendo Test:</title>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/kendo.all.2014.1.318.min.js"></script>
    <link href="/Css/kendoui/kendo.common.core.min.css" rel="stylesheet" />
    <link href="/Css/kendoui/kendo.blueopal.min.css" rel="stylesheet" />
    <link href="/Css/kendoui/kendo.rtl.min.css" rel="stylesheet" />
</head>
<body>
 
    <div id="example" class="k-content">
        <div class="demo-section k-rtl">
            <h2>RTL : spinners: false</h2>
            <input id="numerictextbox" />
        </div>
 
        <script>
            $(document).ready(function () {
                $("#numerictextbox").kendoNumericTextBox({
                    spinners: false
                });
            });
        </script>
 
    </div>
</body>
Dimo
Telerik team
 answered on 20 May 2014
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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
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
Licensing
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?