Telerik Forums
Kendo UI for jQuery Forum
4 answers
90 views
Hi there,
i made an iOS App, where I´m using the Mobile List View and Pull to refresh, without any Problems.

After porting my App to Android I ran into problems with the loading spinner. There is no Javascript error and the content gets refreshed as expected but the spinner isn't hiding after the refresh. My Code looks like this:

01.var dataSource = new kendo.data.DataSource({
02. transport: {
03.read: {
04. url: "URL.TO.MY.SERVER",
05.contentType: "application/json; charset=utf-8",
06.type: "GET",
07.dataType: "jsonp",
08.data: {
09.foo: "bar",
10.type: "start",
11.device: deviceID
12.}
13.}
14.}
15.});
16. 
17.$("#listView").kendoMobileListView({
18.          dataSource: dataSource,
19.          template: kendo.template($("#template").html()),
20.          pullToRefresh: true,
21.          pullTemplate: "Zum Aktualisieren runterziehen",
22.          releaseTemplate: "Zum Aktualisieren loslassen",
23.          refreshTemplate: "Aktualisiert..."
24.});

Tested Devices:
HTC ONE - Android 4.0.3 (real device)
NEXUS ONE - Android 4.2.2 (AVD)
Kai
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
1.4K+ views
Hi,
how do you set the column width for a command in a kendo Grid? All my columns have widths, and when the grid resizes, they all do nicely until I introduce a command button. I'd like to fix the command button column size and have the others stretch.
Regards,
Jack
Iliana Dyankova
Telerik team
 answered on 11 Apr 2013
5 answers
160 views
We are experiencing difficulties with inline javascript and oher events such as selecting text on the IPAD.
a typical problem on the IPAD is not firing a onClick handler or handler on a href <a href="javascript:...
In some cases, after many clicks, it does seem to work, feels like something is blocking the event.

When hooking events with Jquery
$("a.enlargePicture").on("click touchstart", function (e)
{
//do something.
e.preventDefault();
});
it seems to work fine.

Is there a way to get around this?
Alex Gyoshev
Telerik team
 answered on 11 Apr 2013
2 answers
178 views
I have a Grid linked to a remote dataSource that's using a rowTemplate.

I've now configured the dataSource to group by a particular column and also set the column definition to hidden for the grouped field. Finally, in the rowTemplate, the particular <td> for the grouped field has display: none applied.

This all works -- the column for the grouped field is not displayed and it all looks fine.

However, I don't seam to be able to use a groupHeaderTemplate for the hidden column, so my internal field name is displayed in the group header. I've tried simply using: groupHeaderTemplate: '#= value #' in the column definition but it seems to be ignored.

I have another Grid which is essentially the same, but doesn't use a rowTemplate. This allows me to specify a groupHeaderTemplate for the hidden column.

How is it possible to combine a custom rowTemplate and a groupHeaderTemplate?
M
Top achievements
Rank 1
 answered on 11 Apr 2013
3 answers
1.2K+ views
I have a data source returning Units and Price.  I need to create a column, Extende Price, in a grid to display:

Units    | Price | Extended Price (Units * Price)

I can't see how I can do this.

Jeff
quaso
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
137 views
kendo.parseDate is case sensitive on month names/abbreviations.

Parsing a simple format as dd-MMM-yyyy is case sensitive: 01-Mar-2013 will parse ok, but 01-mar-2013 does not. jsFiddle sample: http://jsfiddle.net/Cpehb/

We are using KendoUI version 2013.1 319

kendo.core.js, line 1164: 
day = count < 3 ? getNumber(2) : getIndexByName(calendar.days[count == 3 ? "namesAbbr" : "names"]);

getIndexByName (line 1096) performs a case-sensitive match.

Can this be extended to support case-insensitive matches in later release?
Georgi Krustev
Telerik team
 answered on 11 Apr 2013
1 answer
327 views
The DateTimePicker does not appear to be able to bind to a DateTimeOffset type nor have the capability to deal with different time zones. With global applications this capability is important. Is there a plan to include this functionality in the future? In the meantime, is there a recommended pattern to handle DateTimeOffset values?
Petur Subev
Telerik team
 answered on 11 Apr 2013
1 answer
589 views
Hi friends,

I have a strange problem in Kendo UI - which I dont understand.

This is my code.

$(document).ready(function() {

        var kendo_dataSource = new kendo.data.DataSource({
            autoSync: true,
            batch: true,
            transport: {
                read: {
                    url: "<?php echo BASE_URL . 'kendo/kendo_grid_read' ?>",
                    dataType: "json"
                },
                destroy: {
                    url: "<?php echo BASE_URL . 'kendo/kendo_grid_destroy' ?>",
                    dataType: "json",
                    type: "POST"
                },
                parameterMap: function(data, type) {
                    if (type == "destroy") {
                        return {models: data.models}
                    }
                }
            },
            serverFiltering: true,
            serverGrouping: true,
            serverPaging: true,
            page: 1,
            pageSize: 5,
            schema: {
                data: "results",
                total: "total",
                model: {
                    id: "field1"
                }
            }
        });

        $("#kendo_grid2").kendoGrid({
            dataSource: kendo_dataSource,
            height: 300,
            filterable: true,
            sortable: true,
            pageable: true,
            selectable: "multiple row",
            columns: [
                {
                    field: "field1"
                },
                {
                    field: "field2"
                },
                {
                    field: "field3"
                }
            ]
        });

        $("#test_button").on("click", function() {
            var selectedRows = $("#kendo_grid2").data("kendoGrid").select();
            if (selectedRows.length > 0) {
                for (var i = 0; i < selectedRows.length; i++) {
                    var dataItem = $("#kendo_grid2").data("kendoGrid").dataItem(selectedRows[i]);
                    console.log(dataItem);
                    kendo_dataSource.remove(dataItem);
                }
            }
        });

    });

Here goes the situation.

When the $("#test_button").on("click", function() is fired, it checks for the selected rows in the grid - and delete the rows.

If I select 2 rows, it deletes 2 rows. And the 2 rows are disappeared from the Grid.

But, I see something strange -

whhen 2 rows are deleted, there is 2 POST request - which is fine.

But the first POST request's parameters are

    models[0][field1]    3
    models[0][field2]    poioioi
    models[0][field3]    oiuoiuuigbhkjh
    models[0][field4]    kjh kjhkjhyt

And the second POST request's parameters are

    models[0][field1]    3
    models[0][field2]    poioioi
    models[0][field3]    oiuoiuuigbhkjh
    models[0][field4]    kjh kjhkjhyt
    models[1][field1]    4
    models[1][field2]    kjhk hkiui
    models[1][field3]    khkj
    models[1][field4]    mkhkhkhkjhghgfgdf

And I understand that, I can access the data in the server like this

    foreach ($_POST['models'] as $model) {
                echo $model['field1'];           
    }

I was wondering if its possible to send only one request - possibly the second POST request only, as I can delete the 2 rows in one request.

Or sending 2 separate request but with only one model at a time?

Is it possible?

Any help would be greatly appreciated.

I understand that autoSync should be set to false and I should I call  to solve this situation.

But, I wonder if where should I call it? After the for loop ?

With kind regards,

Ajeesh
Atanas Korchev
Telerik team
 answered on 11 Apr 2013
1 answer
144 views
Hi, 

I  am trying to create a Kendo Mobile ListView with infinite scrolling and a detail view.
When I select a list item the e.dataItem allows me to pass data to display on selected Item Detail view.
This works fine until the infinite scroll is triggered and loads in more list items...
The DataSource then appears to no longer contain the old items, and therefore e.dataItem is undefined.
I can't seem to find a method that works?

Thanks for your help,
David

// kendoMobileListView code snippet:
click: function(e){
     if ( e.dataItem != undefined )
     {
            console.log("selected: " + e.dataItem.id);
            viewModel = e.dataItem;
            // bind to detail view
            if ( viewModel  != null )
            {
                // extend view model
                viewModel.dateText = function(){ return kendo.toString(new Date(this.startDate),"ddd MMM yyyy h:mm tt"); }
                kendo.bind( $("#viewMyEventItemDetail"), viewModel );
                //app.navigate("#viewMyEventItemDetail");
            }
     }
}

PS. It would also be nice to have some examples/demos showing infinite scroller and a detail view?
Alexander Valchev
Telerik team
 answered on 11 Apr 2013
6 answers
350 views
   Hi, 
I was trying to open the following window on the button click using " $("#window").data("kendoWindow").open();" but the window opens with a extremely small  width and height i tried to specify height and width to window but to no vail. 
Have specified the following window inside a Form tag 
@(Html.Kendo().Window()
    .Name("window")
    .Title("PersonSearch")
                .Content(
                                          Html.Partial("_PersonSearch", new PersonSearchModel()).ToHtmlString()
                        )
    .Draggable()
    .Resizable()
    .Width(980)
            //.Height(350)
    .Visible(false)
    .Modal(true)
    .Events(ev => ev.Open("onOpen"))
)

_personsearch is the partial view that i load in the window it gets loaded properly
Markus
Top achievements
Rank 2
 answered on 11 Apr 2013
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?