Telerik Forums
Kendo UI for jQuery Forum
1 answer
226 views

Hi,

What I am trying to do :

1)I have a form with Kendo UI controls like DatePicker(s), Dropdownlist(s), NumericTextBox(s) on the first half of the page
2)Second half has a Kendo UI MVC Grid control
  a) This Kendo UI Grid control has 8 columns in which 2 columns has a Kendo dropdownlist(EditorTemplate) and CheckBox(EditorTemplate).
  b) The Kendo UI Grid control is Ajax binding.
3) When the save button is clicked, all the values from the Kendo UI controls(first half) and Kendo UI grid control(second half) together
   are posted as a Json object via "Ajax Post" to the controller.
4) I am using Model binding for the above process

Issues or the problem I am facing :
1) The first half of the form with other Kendo UI controls are posting their values properly to the controller, but where as
   the Kendo UI Grid is having some problems posting some column values
  
   a) The columns in the Kendo UI Grid with the datatype decimal is not posting the values
   b) The EditorTemplate controls like the CheckBox and the kendo dropdown when selected shows the values "[Object Object]" for dropdownlist
      and the actual value of the boolean rather than the checkbox control.
  
Here is the project and attaching the same.
Please refer the /Views/Index view page for the above mentioned.

Daniel
Telerik team
 answered on 21 Feb 2013
1 answer
230 views
Hi,

I have a requirement where shortYearCutOff has to be 29, but its hardcoded as 30 in Kendo UI.

 $("#sampleDate").kendoDatePicker({
    format: "MM/dd/yyyy",
    parseFormats: ["MMddyy"]
});

Here is the condition how it works:
If yy <= zz, then automatically substituted by year 20YY
If yy > zz, then automatically substituted by year 19YY
Where zz – shortYearCutOff (it’s a local variable which is used in function parseExact())

Input

Output

Expected Output where shortYearCutOff=29

031329
031330
031331
031332

03/13/2029
03/13/2030
03/13/1931
03/13/1932

03/13/2029
03/13/1930
03/13/1931
03/13/1932


Thanks
Nishad.
Georgi Krustev
Telerik team
 answered on 21 Feb 2013
1 answer
228 views
I have a kendo grid implemented with popup editing. I wired up a function to the save event so that when the user clicks 'Update' an ajax request is made. I'm trying to find a way to cancel the update and not add the new or updated data if the request returns an error.

options.save = function (e) {
    widget.save.call(viewModel, e.model.toJSON(), function () {
        e.preventDefault();
    });
};

The save function being called makes a $.post() request and if the response comes  back with an error it will fire the callback passed to save.
I have noticed that as soon as an ajax call is made the edit popup is closed and the data appears in the grid even though the ajax call hasn't been returned yet.  This led me to return a jquery deferred in my function,  but regardless of the deferred the changes are still saved to the grid before the deferred is returned.

How can I cancel the save event so that all changes that I've made to the data are reversed?

widget.options.save = function (e) {
    $.when(widget.save.call(viewModel, e.model.toJSON())).then().fail(function () {
        kendoGrid.cancelChanges();
    });
};
function save (item) {
var url = constants.handlerUrl + 'action=save';
var data = JSON.stringify(item);
var deferred = $.Deferred();

return $.post(url, data).pipe(function(data, textStatus, jqXHR) {
var deferred = $.Deferred();
data = ko.utils.parseJson(data);

if (data.error) {
return deferred.reject();

var location = ko.utils.arrayFirst(self.locations, function (item) {
return item.id == data.id;
});
location.zipCodes(data.zipCodes);

return deferred.resolve();
});
};
Vladimir Iliev
Telerik team
 answered on 21 Feb 2013
1 answer
486 views
I am creating a Listview control in markup, and on a button click event am initializing and loading data into a datasource for display as result of a user initiated search.  When the user performs a new search, I call the datasource.reload() to retrieve data for the updated search criteria.  The spinner doesn't show up when I do so.  What can I do to get the spinner to show during the reload operation?  Here is the code that handles the 'click' event of the search.  Everything works fine except there is no spinner during read()
//Handle the search 'GO' button click event
this.doItemSearch =
function () {
//this selector grabs the search criteria
    if ($('#searchCriteria').val() != '') {
        if (dataSource)
            dataSource.read();
        else
            initdataSource();
         
        if (listView) {
            //Do nothing
        }
        else {
            listView = $("#myListView").kendoMobileListView({
                dataSource: dataSource,
                template: $("#myTemplate").text(),
                endlessScroll: true,
                scrollTreshold: 30 //treshold in pixels
            });
        }
    }
}
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
2 answers
268 views
I tried to bind a grid from the corresponding to the data entered in a textbox, but the grid is not populated
Also there is no error displayed
 This is the code i used

$("#txtSearchCaller").keyup(function () { SearchCaller($(this)); });

function SearchCaller(txtSearchCaller) {
            SearchRequestProcess = $.ajax({
            type: "GET",
            url: baseURL + "Call/SearchCaller",
            data: "term=" + $(txtSearchCaller).val(),
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: OnGetCallerSuccess,
            error: function (request, status, error) { if (request.statusText != "abort") { alert("SearchCaller:: " + request.statusText); } }
                });
    }
}
function OnGetCallerSuccess(Jsondata, status) {
    $("#Grid").kendoGrid({ // create Grid from div HTML element Kendo
        dataSource: Jsondata,
        selectable: "row",
        scrollable: true,
        navigatable: true,
        resizable: true,
        groupable: false,
        columns: [
                    {
                        field: "category1",
                        title: "category1",
                        width: 80
                    },
                    {
                        field: "category2",
                        title: "Customer Name",
                        width: 80
                    },
                ]
    });
}
Mathew
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
174 views
The viewmodel's 'change' (and possibly other events) trigger more than once if a nested value is changed. The event appears to be triggered once per nested level. So changing 'nested.value' triggers twice and changing 'very.deeply.nested.value' triggers four times.

I prepared a very simple example at http://jsfiddle.net/eMATB

Am I doing it wrong or is it a kendo bug?
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
6 answers
345 views
In TreeView control checkboxes.checkChildren property is set to false. If you select children checkboxes, the parent checkbox is selected automatically. It works this way regardless of the checkChildren property is set to true or false.
$(tree).kendoTreeView({
  dataSource: new kendo.data.HierarchicalDataSource({
    transport: {
        read: {
            url: groups_api_url,
            dataType: "jsonp"
        }
    },
    schema: {
        model: {
            id: "key",
            hasChildren: "hasChildren"
        }
    }
  }),
  checkboxes: {
      checkChildren: false
  },
  dataTextField: "title"
});
What I would like is just a "simple" behavior of the control without dependencies between parent and child nodes, i.e. if a checkbox is checked, nothing should happen with other checkboxes.

For example, on the screenshot1, if "Job" checkbox is selected, "Test by w_admin" should not be selected automatically.

KendoUI: 2012.3.1315
OS: Windows 7
jQuery: 1.7.1
jQueryUI: 1.8.16
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
2 answers
123 views
In a ListView, a script to open an external link by native browser is called when a link is clicked. 

On Android:
navigator.app.loadUrl(link,  { openExternal:true } );
On iOS:
window.open(link, '_system');

The link can be opened on the corresponding native browser. 

When the user try to switch back to the app, some problems happen after that. 

On Android, the screen hung on the original view, when the back button is pressed again, the screen is un-freezed and can be refreshed.

On iOS, however, the screen is also hung on the original view. When tapped on the screen, the complete view (with the layout) is moved. There is no way to un-freeze this screen.

How to fix this so that the screen can be un-frezzed after switching back from the native browser to the app?

Thank you very much for your help.
Alexander Valchev
Telerik team
 answered on 21 Feb 2013
6 answers
158 views
Hi,

The new imagebrowser enhancement is great - I just need a document browser that is similar in functionality like the current imagebrowser but allows me to link to the documents that a user has uploaded - similar to DocumentBrowser used in the ajax Editor.  Is this possible or is it a feature that is soon to be added?

Thank you,
David A.
David A.
Top achievements
Rank 1
 answered on 20 Feb 2013
3 answers
503 views
Hello,

I am trying to center a Kendo UI Window on screen, but I just cant.

I tried with dynamic content, static content, and always the same result, the window dont get centered.

http://jsfiddle.net/X7qxs/

¿What I am doing wrong?

Thanks
Dimo
Telerik team
 answered on 20 Feb 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
Drag and Drop
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
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
Licensing
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?