Telerik Forums
Kendo UI for jQuery Forum
4 answers
594 views
Hello,

I am using scatter line graph and i want to edit the labels of x-axis to name of months (Jan, Feb, March, Apr .... Dec) instead of numbers which are currently rendered. Below is the code and screenshot is attached.

function rceTime() {
    $("#chart9").kendoChart({
        theme: $(document).data("kendoSkin") || "default",
        title:  {
            text: "Visa Expiry and Contract Expiry in Coming months"
        },
        dataSource: {
            transport: {
                read: {
                    url: "scripts/contractExpiry.json",
                    dataType: "json"
                }
            }
        },
        legend: {
            visible: true,
            position: "right"
        },
        seriesDefaults: {
            type: "scatterLine",
                                             
        },
        series: [{
            name: "Contract Expiry",
            xField: "month",
            yField: "day"
        },{
            name: "Visa Expiry",
            xField: "month1",
            yField: "day1"
        }],
        xAxis: {
            title:  {
                text: "Month"
            },
            max: 12,
             
        },
        yAxis: {
            title:  {
                text: "Date of Month"
            },
            min: 0,
            max: 31,
            labels: {
                format: "{0}"
            }
        },
        tooltip: {
            visible: true,
            template: "#= dataItem.name #"
        }
    });
}
RamaKrishna P
Top achievements
Rank 1
 answered on 28 Aug 2013
2 answers
328 views
I would appreciate advice on how to use autocomplete with "suggest" to meet the following user requirements:
  • key in enough data to cause the desired selection to be suggested in the autocomplete text box and hit enter to navigate to the selection 
  • key in enough data to cause the desired selection to be suggested in the autocomplete text box and click a search buton to navigate to the selection
  • key in some data and pick one of the autocomplete selections from the list to navigate to the selection
  • key in data that does not autocomplete and hit enter causing a "not found" dialog to be displayed
  • key in data causing the drop down to display but then click somewhere else on the screen without any navigation happening
I have been working on this a while and am probably missing something simple.  I feel my implementation is too complicated and there should be a simpler way to achieve the requirements above.  My example below meets all of the requirements except the last one.  I can't find a way to solve the last one and still meet the other requirements.  In the example below, I pop an alert instead of navigating for demo purposes.  Because of this in a few of the cases it appears to navigate twice but in reality it would only navigate once. 

My example is in a jsbin at: 
http://jsbin.com/oToy/1/edit?html,output


Kerry
Top achievements
Rank 1
 answered on 27 Aug 2013
1 answer
147 views
I have a class

public class Event
{
  public DateTime eventDate {get; set;}
  public string name {get; set;}
  public double eventvalue {get; set;}
}
And  a controller that returns a list of events.  I'm returning several events, but only one eventvalue and one date is showing up on the chart.


<div class="chart-wrapper">
    @(Html.Kendo().Chart(Model)
        .Name("chart")
        .Title("events")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Bottom)
        )
        .Series(series => {
        
                series.Line(model => model.eventvalue )
             .Name(item.name );
             //.Labels(labels => labels.Format("{0:N0}").Visible(true));
       
        })
        .CategoryAxis(axis => axis
            .Categories(model => model.eventDate )
        )
        .ValueAxis(axis => axis.Numeric()
            .Labels(labels => labels.Format("{0:N0}"))
        )
    )
   
</div>
I've even tried this:
<div class="chart-wrapper">
    @(Html.Kendo().Chart(Model)
        .Name("chart")
        .Title("Product Samplings")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Bottom)
        )
        .Series(series => {
            foreach (var item in Model)
            {
                series.Line(model => model.eventvalue )
             .Name(item.name );
             //.Labels(labels => labels.Format("{0:N0}").Visible(true));
            }
         
        })
        .CategoryAxis(axis => axis
            .Categories(model => model.eventDate )
        )
        .ValueAxis(axis => axis.Numeric()
            .Labels(labels => labels.Format("{0:N0}"))
        )
    )
  
</div>

Patrick
Top achievements
Rank 1
 answered on 27 Aug 2013
1 answer
83 views
Hi,

   log off not working for my application if i redirect div app.navigate("#login"); then its navigating to login but if i log in with another login credential then last login uer data getting i am not getting new user data in my listview. 
navigator.app.exitApp();
   this.finish(); 
exit(0);
Process.killProcess( Process.myPid() )
i used all these above options  code its working in android but not working in iphone can anyone help me in this issue.

with regards
sumalatha
Steve
Telerik team
 answered on 27 Aug 2013
1 answer
170 views
I am trying to use kendoui datasource to pull list of post into a listview with Hierarchical data binding from a Wordpress site using json. Please point me to the right direction in doing this, i have tried using kendoui datasource but no luck on this.

Below is  the code  i am  working with so far.

01.var dataSource = new kendo.data.DataSource({
02.  transport: {
03.    read: {
05.      contentType: "application/json; charset=utf-8",
06.      dataType: "jsonp", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
07.    }
08.  },
09. schema: {
10.    data: function(response) {
11.      return response.posts; // twitter's response is { "results": [ /* results */ ] }
12.    }}
13.});
14.dataSource.fetch(function(){
15.  var data = this.data();
16.  console.log(data.length);
17.  console.log(data[0].title);
18.  dataSource.sync();
19.});

Steve
Telerik team
 answered on 27 Aug 2013
2 answers
417 views
Is it possible to add a customer css class to the events? We have a circumstance where we're building out some custom filtering on the scheduler and we need to be able to dynamically it in the colors of the events with a legend for the filters. Also, in the future we may need to dynamically extend those filters; so, being able to apply a custom CSS class to the events based on a type would be extremely helpful.

Is there any way to pull this off currently?
Dominick
Top achievements
Rank 1
 answered on 27 Aug 2013
6 answers
1.5K+ views
Hi,

Is there a way to fresh the calendar? I fill the dates from a datasource and I don't want to get all the events from a whole year.

Thanks,
Martin
John
Top achievements
Rank 1
 answered on 27 Aug 2013
1 answer
218 views
Hello. 
I try to use following code:
<html lang="en" class="no-js k-webkit k-webkit28">
<head>
    <meta charset="utf-8">
    <title>TEST page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="kendo.common.min.css" media="screen" />
<link rel="stylesheet" type="text/css" href="kendo.metro.min.css" media="screen" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/JavaScript" src="kendo.web.js"></script>
<script>
    $( document ).ready(function() {
        var emailBody = new kendo.ui.Editor(
            document.getElementById('emailBodyNew'),
            {
                tools: [
                    "bold",
                    "italic",
                    "underline",
                    "strikethrough",
                    "fontName",
                    "fontSize",
                    "foreColor"],
            }
        );

var fileUpload = new kendo.ui.Upload($("#attachmentUpload"), {
                async: {
                    saveUrl: "Email/UploadAttachment",
                    autoUpload: true
                },
                multiple: true,
                showFileList: false,
                success: function (model)
                {
                    finshAttachmentLoading(model.response);
                },
                error: function (error)
                {
                    console.log(error);
                },
                upload: function(e)
                {
                    console.log(e);
                },
                localization:
                    {
                        dropFilesHere: "Put files here"
                    }
            });

$("#testbutton").on("click", function () { 
$("attachmentUpload").click();});
});
    </script>
</head>
<body>
<div class="email-body">
<textarea id="emailBodyNew"></textarea>
<div class="upload-attachments-wrapper">
<input type="file" id="attachmentUpload" name="fileUpload" />
<button id="testbutton">Click me</button>
</div>
</div>
</body>
</html>

But IE9 showed me always  Access Denied error on line with following code: form[0].submit(); (method performUpload).
What should I need to change to fix this problem?
T. Tsonev
Telerik team
 answered on 27 Aug 2013
2 answers
259 views
Hi,

I am currently trying out some activities using the Kendo Grid and have an issue where the grids change event is being fired every time the a custom command is clicked. This happens in IE 10 and i would greatly appreciate if Kendo UI experts can help me figure out a possible solution. I've gone through quite a number of threads but found no avail.

A sample can be found at this location at http://jsfiddle.net/praneethw/eudVd/4/

The steps are as follows,
Click on the 'Remove' command.
Notice the browser console where the Grid Changed and Removed Item is being printed. This means that the gridChange() function and removeItem() function are both being invoked.

I used the following code block, to prevent the event from bubbling. However in IE 10 this does not seem to work properly. Could anyone help me out on this please.
// Prevent the grid command 'click' event from triggerring the grids 'change' event.
grid.tbody.on('mousedown', 'a', function (evnt) {
    evnt.stopImmediatePropagation();
});
Thanks and Regards,
Praneeth
Praneeth
Top achievements
Rank 1
 answered on 27 Aug 2013
1 answer
876 views

Im using the following code to read from a database, output to json and transfer to my Kendo UI Combobox.
It works great. BUT i can´t figure out how to do add a special item that is first in the list and is selectable.
I would like to add "No Project" and it should be selected as default. It should be on top of the list.

               var project = $("#project").kendoComboBox({
                        filter: "contains",
                        height: 300,
                        //text: "No Project",
                        //value: "",
                        autoBind: false,
                        suggest: true,
                        highLightFirst: false,
                        placeholder: "Select project...",
                        dataTextField: "DBText",
                        dataValueField: "DBValue",
                        template: '<span class=\"comboList\">${ data.DBText }</span>',
                        change: ProjectonChange,
                        dataSource: {
                            type: "json",
                            serverFiltering: false,
                           
                            transport: {
                                read: "ListCustomers.cshtml?list=project&uid=@QueryUserId"
                            }
                        }
                    }).data("kendoComboBox");
Kiril Nikolov
Telerik team
 answered on 27 Aug 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?