Telerik Forums
Kendo UI for jQuery Forum
2 answers
180 views
I'm trying to use kendo mvvm to solve the following problem: I have 3 dropdown lists, and I need that the option selected in one dropdown doesn't appear in the other two.
I got that working, but if you start changing options in the dropdowns sometimes the displayed value in one of the dropdowns changes without any reason. For example, if I select "grapes" in the first dropdown, and then I start playing with the dropdown 2 (change it to mango, then apple, then mango and so on) the dropdown 1 display changes from "grapes" to something else (even though the value in the view model is still "grapes").

I prepared a jsbin with my code http://jsbin.com/ebuhaq/1/edit
dmorgan
Top achievements
Rank 1
 answered on 08 Feb 2013
6 answers
949 views
I am trying to set up a call using the datasource control in a html page, based on the following:

http://docs.kendoui.com/api/framework/datasource#transportcreatedata-objectstringfunction

Below is my js function call, and what I am trying to so is pass the customer header called "key" with the value to my restful service, and not sure if I am doing this correctly or not, I am assuming not as I am not seeing this value in my service. So any help you can give on this would be appreciated. Thanks.
function mobileListViewPressToLoadMore() {
       var dataSource = new kendo.data.DataSource({
           pageSize: 20,
           serverPaging: true,
           transport: {
               create: {
                   data: { key: "34083E61DB18E3E88C80DB638C91009A9934757542B538C20E332BBC3F079BE66E79BDC70F06EED8541925D95599E834CF8877D07FAF4645A190BFA3E38A9A3FCB728E043EB8A081B279B81F6F9CED5A"
                   }
               },
               read: {
                   url: "http://services/rest/plan.svc/Patient" // the remove service url
 
 
               },
 
               parameterMap: function (options) {
                   var parameters = {
                       q: "javascript", //additional parameters sent to the remote service
                       rpp: options.pageSize,
                       page: options.page //next page
                   };
 
                   return parameters;
               }
           }, schema: { // describe the result format
               data: "", // the data which the data source will be bound to is in the "results" field
               total: function () { return 0; }
           }
       });
 
       $("#load-more").kendoMobileListView({
           dataSource: dataSource,
           template: $("#load-more-template").text(),
           loadMore: true
       });
 
   }
JD
Top achievements
Rank 1
 answered on 08 Feb 2013
1 answer
128 views
I am trying to make a line chart where the categoryAxis has a baseUnit of "month".

The data is an array of objects

[0].price = 34
[0].priceDate = javascriptDate

The data bind and the chart is there but it looks like a bunch of points with none of them connected by a line. OR depending on the data, some points are connected.


$("#previewChart").kendoChart({
                theme: "blueOpal",
                title: {
                    text: customDataViewModel.CustomDataName
                },
                legend: {
                    visible:false
                },
                chartArea: {
                    width: 680,
                    height:380
                },
                plotArea: {
                    margin: { bottom: 10, right: 100}
                },               
                dataSource: wth,
                series: [{
                    type:"line",
                    field: "price"
                }],
                categoryAxis: {
                    type: "date",
                    field: "priceDate",
                    baseUnit: "month",
                    labels: {
                        format: "MMM/yy",
                        title:"",
                        rotation:-90
                    }
                },
                valueAxis: {
                    
                },
                tooltip: {
                    visible: true,
                    template: "Price: #= value #<br/>Date: #= kendo.toString(category, 'MMM/yyyy') #"
                }
            });                        
        });      

I need every point to show and for them to be connected by a line.

Iliana Dyankova
Telerik team
 answered on 08 Feb 2013
1 answer
110 views
hi guys
Had problems when I try to filter a date column type.

Project code attached and this is the video error http://www.screencast.com/t/UggvI7Ji

thank you very much

Daniel
Telerik team
 answered on 08 Feb 2013
2 answers
467 views
I have some odd behavior happening in a combo box.

I have a simple combo box setup.

@(Html.Kendo().ComboBox()
                  .Name("vendorsforClass")
                  .AutoBind(false)
                  .HtmlAttributes(new { style = "width: 300px;" })
                  .DataTextField("Name")
                  .DataValueField("Id")
                  )
I have a link button that calls this javascript code.

function getVendorsForClass() {
 
        var txtValue = $("#txtSearchClassVendor").val();
 
        $.getJSON('@Url.Action("GetVendorListByClass","RCS", new {classes = "class"}, "http")/' + txtValue, function (data) {
 
            var combo = $("#vendorsforClass").data("kendoComboBox");
            combo.setDataSource(data);
            combo.refresh();
        });
}
This is the code in the controller that is creating the json object.

public JsonResult GetVendorListByClass(string classes)
        {
            var vendors = new List<VendorList>();
 
            var classId = classes.Split('/')[1];
 
            int outId;
            if (int.TryParse(classId, out outId))
            {
                vendors = new VendorListFactory().GetVendors(outId);
            }
 
            return this.Json(vendors.Select(v => new { v.Name, v.Id }), JsonRequestBehavior.AllowGet);
        }
Everything works perfectly on the first time I click on the link to populate the combo box.  If I select a value in the combo box, say for example it's Id happens to be 1234, when I click on the link again (with the intention of repopulating the combo box with different set of values) with a different value that returns back an empty object (no results in the list), the combo box is left with no values in the drop down (which would be correct), but the text in the combo box say 1234.

The box is left with the Id on the previous value I selected.  I thought when I call setDataSource it rebinds the combo box, meaning it removes previously selected values.  Why is the combo box setting it's text as the previous value (Id) that I had selected when the second datasource happens to be an empty list?

Thanks,
Tad
TAD RHODES
Top achievements
Rank 1
 answered on 08 Feb 2013
2 answers
97 views
I have a listview where each item has a 2 divs, one with info and a second with a form, the form is hidden but when I tap the item it uses kendo.fx.expand to slide the drawer down and display the form, this part works perfectly, but when I change the input and move focus it resets the display:none on the parent div and hides it. I have no events set on the input to trigger this. And all my debug ideas so far have yielded no results.

Just a regular onblur does nothing (the div stays as it should), the problem only appears on change + blur. I've tried overriding the onchange and onblur events thru direct declaration in the input using "return false;" and using data-bind="events: {blur: ..., change: ...}" .

I also tried using jquery.slideToggle and get the same result.

Attached is a sample project that demonstrates the problem.

Any ideas on what I am doing wrong or could change?
JT
Top achievements
Rank 1
 answered on 08 Feb 2013
1 answer
614 views
I have 2 grids displayed on one page, our top Grid allows editing with a custom edit command.  Our lower grid allows for inline editing.  I want the ability to disable the top grid's custom Edit function (Edit button) when I click in the lower grid for inline editing using jQuery.  Below is what I have attempted

            $(function () {
                $(document).ready(function () {
                    var inlineEdit = $("#kendoGrid").data().kendoGrid.select().is(".k-grid-edit-row");
                        if (inlineEdit > 0) {
                            var edit = $("#kendoGrid").data("kendoGrid").find("k-grid-edit");
                            edit.hide();
                            e.preventDefault();
                            return false;
                       }
   });
                });
Iliana Dyankova
Telerik team
 answered on 08 Feb 2013
1 answer
110 views
Hi,

I have two questions regarding the kendo stock chart:

1. I need to retrieve a list of the currently displayed data points (not the whole data set of the series) in the events zoomEnd, dragEnd and selectEnd in order to perform some normalization. How can this be done?

2. For the same events, how do I get the min and max of the currently displayed range of the x axis?

Thanks.
Iliana Dyankova
Telerik team
 answered on 08 Feb 2013
1 answer
162 views
I can't get the touch demo on the site to work. I copied the source, but I can't get it running. This is my code:

<!DOCTYPE html>
<html>
<head>
    <title>Voiss</title>
     
    <script src="Scripts/kendo/last/jquery.min.js"></script>
    <script src="Scripts/kendo/last/kendo.all.min.js"></script>
    <link href="Content/kendo/last/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="Content/kendo/last/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="Content/kendo/last/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
     
</head>
 
<body>
    <div data-role="view" data-title="Touch Events">
 
    <div
        id="touchSurface"
        data-role="touch"
        data-enable-swipe="1"
        data-touchstart="myTouch.touchstart"
        data-swipe="myTouch.swipe"
        data-tap="myTouch.tap"
        data-doubletap="myTouch.doubletap"
        data-hold="myTouch.hold"
        >
    Touch, swipe, double-tap, tap, and hold me
</div>
<div class="console"></div>
</div>
 
<script>
    window.myTouch = {
        touchstart: function(e) { kendoConsole.log("touch start"); },
        swipe: function(e) { kendoConsole.log("swipe " + e.direction); },
        tap: function(e) { kendoConsole.log("tap"); },
        doubletap: function(e) { kendoConsole.log("double tap"); },
        hold: function(e) { kendoConsole.log("hold"); }
    }
</script>
 
<style scoped>
    #touchSurface {
        background: black;
        color: white;
        padding: 20px;
        line-height: 20em;
        text-align: center;
        font-style: italic;
    }
</style>
 
 
<script>
    var app = new kendo.mobile.Application(document.body);
</script>
</body>
</html>

The js and css files are the latest, but it fails to run, both on my browsers (chrome, firefox, ie) as my tablet (android)
Martijn
Top achievements
Rank 1
 answered on 08 Feb 2013
10 answers
195 views
Hi guys,
I developing a website using tile effect to achieve a kinda of win8-like style.

I followed the example on kendo effect page and my tiles works pretty well on chrome..
the issue is that on other browser, when the tile slides to show its "back", the front is still visible...
I checked my code with the one from kendo and it seems the same...

this is my generalized javascript function to append a new tile

var rawDiv = $("<div>").append
(
     $("<div>").attr("id", idDiv).addClass("boxSlider " + other class).append (
             $("<span>").addClass("cover"),
             $("<span>").addClass("description")
     )
 )
  
return rawDiv.html();
while this is my css 
.boxSlider {
    display: inline-table;
    margin: 5px;
    overflow: hidden;
    position: relative;
}
 
    .boxSlider .cover {
        width: 100%;
        height: 100%;
        line-height: 100px;
        position: absolute;
        text-align: center;
        display: block;
        color: #fff;
        font-weight: bold;
        font-size: 18px;
    }
 
        .boxSlider .cover .bsFooter {
            width: 100%;
            font-size: 14px;
            line-height: 15px;
            bottom: 10px;
            margin: 0;
            position: absolute;
            text-transform: uppercase;
            font-weight: normal;
        }
 
    .boxSlider .description {
        display: none;
        width: 100%;
        height: 100%;
        position: absolute;
        font-size: 12px;
        color: #fff;
        overflow-y: auto;
    }
 
        .boxSlider .description span {
            display: block;
        }
 
        .boxSlider .description p {
            margin-left: 10px;
            max-width: 280px;
            min-width: 240px;
            float: left;
        }
and this is the effect

BoxSliderAnimation: function () {
        $(".boxSlider").hover(
           function (e) {
               var div = $(e.currentTarget);
               kendo.fx(div.find(".description").css("display", "block")).tile("left", div.find(".cover")).play();
           },
 
          function (e) {
              var div = $(e.currentTarget);
              kendo.fx(div.find(".description")).tile("left", div.find(".cover")).reverse();
          });
    },
I attached an image to show this behavior.

Thanks to all





Gaetano
Top achievements
Rank 1
 answered on 08 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
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
Bronze
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
Bronze
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?