Telerik Forums
Kendo UI for jQuery Forum
1 answer
79 views
I have set a column in grid with the following format 
columns: [
                    { title: 'Date & Time', field: 'date', width: 130, sortable: true, template: '#= kendo.toString(date, "dd MMM yyyy") #' },

But the result i am getting is

2012-12-21T00:00:00 in Date feild 

Why is this like this?
Alexander Valchev
Telerik team
 answered on 22 Feb 2013
7 answers
382 views
Does the new kendo calendar no longer support touch devices? The Beta Q2 worked fine on touch devices but now even the online demos no longer work on touch devices.

Is there any way to get touch devices working with the new kendo calendar? Any insight is greatly appreciated.
John
Georgi Krustev
Telerik team
 answered on 22 Feb 2013
1 answer
92 views
Hi,

   I'm using Kendo UI Drag & Drop library in my project. In sample, I found how to use 'Div" with drag & drop. But my requirement is to use drag & drop between two iframes. Can you share your ideas about how to implement this functionality.
Petyo
Telerik team
 answered on 22 Feb 2013
1 answer
1.2K+ views
I am trying to bind a checkbox to a column in the grid. Actually I was able to display and ticked the check box according to the Boolean value when the datasource is being bound to the grid. but when I tried to do inline editing check box disappears. I used a template field to display the check box.

 template: '<input type="checkbox" #= Archived ? "checked=checked" : "" # ></input>'

but when click edit button it will turn in to a checkbox. I tried following demo

http://demos.kendoui.com/web/grid/editing-custom.html

but there is no way to bind a checkbox to it's container like .appendTo(container).kendoDropDownList(" 

Help me please with a code sample , if you can .


Vladimir Iliev
Telerik team
 answered on 22 Feb 2013
1 answer
31 views
User Interfaces are rendering differently in browsers, buttons shapes are coming as square in even IE8 verion, but its working in chrome.
Alexander Valchev
Telerik team
 answered on 22 Feb 2013
1 answer
106 views
Curious if there's a way to change the year range that's displayed when a user drills down on the datepicker header? specifically when they get to the level where decade blocks are shown.  See attached pic for an example

In the attached file I've got a datepicker where the min and max are set so users can't select anything that's not in the range 2010-2013, however the header of the datepicker is displaying 2010-2019.  Is there a way to modify that so it only shows the range specified by the min/max values??

Georgi Krustev
Telerik team
 answered on 22 Feb 2013
2 answers
426 views
Hello,

We are unable to call some of the REST api's via Kendo framework , which we had successfully called via Jquery ajax requests.
Here below given are the
1. C# Code example of the REST API.
2. Code example which can successfully call the REST API
via jquery ajax request.
3. Format which we have used to call  the REST API
from kendo framework.

It would appreciated if you can provide us with the correct Kendo code format to call this REST api.

1. C# Code example of the REST API.

    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    //[AuthenticatingHeader]
    public partial class Account
    {
 
 
        [WebInvoke(Method = "POST", UriTemplate = "DeleteAccount?uniqueaccessid={uniqueaccessid}", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat =
 
WebMessageFormat.Json)]
        public static void DeleteAccount(string uniqueaccessid, string accountId)
        {
            int userid = Accessibility.GetUserId();
            if (userid > 0)
            {
                string output = Tools.ServiceLayer.Account.DeleteAccount(Convert.ToInt32(accountId), Convert.ToInt32(userid)).ToString();
                HttpContext.Current.Response.ContentType = "application/json; charset=utf-8";
                HttpContext.Current.Response.Write(output);
            }
        }
    }


2. Code example which can successfully call the REST API
via jquery ajax request. 

function GetTransactionAccount(uniqueaccessid, accountId) {
  var jData = {};
      jData.uniqueaccessid = uniqueaccessid;
      jData.accountId = accountId;
      $.ajax({
          url: RestBaseURL + "Account/"DeleteAccount?uniqueaccessid=" + uniqueaccessid + "",
          data: JSON.stringify(jData),
          dataType: "json",
          type: "POST",
          async: false,
          contentType: "application/json; charset=utf-8",
          cache: false,
          success: function (response) {
              alert(response);
 
          },
          failure: function () { alert("failed"); }
      });
  }


3. Format which we have used to call  the REST API
from kendo framework.


    var changeaccid;
    function GetAccountInfo(uniqueaccessid) {
     
    var accid;
 
               var dataSourceobj = new kendo.data.DataSource({
                transport: {
                     read:{
                        url:RestBaseURL + "Cash/GetAccountInfo?uniqueaccessid=" + uniqueaccessid + "",
                        dataType: "json",
                         type: "POST"
                          },
 
                    destroy:{
                        url: RestBaseURL + "Account/DeleteAccount?uniqueaccessid=" + uniqueaccessid ,
                        //url: RestBaseURL + "Account/DeleteAccount",
                        dataType: "json",
                        type: "POST"
                         },
                    parameterMap: function(options, type) {
                    if (type == "destroy") {
                    return {
                    'uniqueaccessid': uniqueaccessid,
                    'accountId': options.models[0].id
                     
                           };
                                         }
                                                          }
 
                },        
                batch: true,
                pageSize: 10,
                schema: {
                    type: "json",
                    model: {
                        fields: {
                            id : {type: "number"},
                            lender: { type: "string" },
                            id: { type: "string" },
                            rate: { type: "number" },
                            startingbalance: { type: "number" },
                            emergencyfund: { type: "number" },
                            startingdate: { type: "date" },
                            balance: { type: "number" }
                                }
                            }
                        }
                 });      
                   
                 $("#grid2").kendoGrid({
                    dataSource: dataSourceobj,
                    height: 130,
                    selectable: "multiple",
                    change: function() {
                        changeaccid = this.dataItem(this.select()).id;
                    },
                    sortable: true,
                    resizable: true,
                    reorderable: true,
                    filterable: true,
                    columnMenu: true,
                    pageable:true,
                    columns: [
                            { title:"" ,template: "<img src='images/ico/acc_on.png'  title='Green: Consider for Debt eliminator payoff. Red: Not consider
 
for Debt eliminator payoff'/>",width: "25px"},
                            { title:"Id",field: "id" ,width: "30px"},
                            { title:"Bank Name",field: "lender" ,width: "185px"},
                            { title:"A/C Number",field : "accountnumber" ,width: "90px"},
                            { title:"Interest Rate%",field: "rate",format: "{0:N}",width: "110px" },
                            { title:"Beg. Balance",field: "startingbalance", format: "{0:c}",width: "95px"},
                            { title:"Emerg. Fund",field: "emergencyfund" , format: "{0:c}",width: "95px"},
                            { title:"Opening Date",field: "startingdate" ,template: '#= kendo.toString(startingdate,"MM/dd/yyyy") #',width: "100px"},
                            { title:"Balance", field: "balance" , format: "{0:c}",width: "70px"},
                            //{ title:"Action", template: "<img src='images/ico/edit.png' title='Edit'/><img src='images/ico/delete.png'
 
title='Delete'/>",width: "50px"}],
                            {title:"Action", command: ["edit", "destroy"], width: "130px" }],
                    editable: "inline"
                    });
  
 
 
 
    }


Kindly provide us with correct code to call the API.


Thanks in advance
Millennium
Top achievements
Rank 1
 answered on 22 Feb 2013
2 answers
77 views
Can the data of a Node contain the datasource that should be used to obtain its children ?

Consider a complicated heterogeneous environment. 
Some level in a tree has
Item-1 type X
Item-2 type X
Item-3 type Y
Item-4 type Z
Item-5 type A

When a node on this level is expanded, the type will be used to select the data source
Case X: Use backend table V_NEW_X 
Case Y: Use dynamic query constructed based on ui fields on page
Case Z: Use items the server scrapes from black box legacy webpage
Case A: Use static array in page

Thanks,
Richard


Richard
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
217 views
hello:
I have a problem about StockChart. Our requirement is to add new data to the StockChart after I get the new data from server. the following code is just a test fragment. But the problem is in the update function when I add the new data to StockChart. the stockchart will totally redraw all the chart. If add the new data to the chart frequently, it is not tolerated. we just need to add the new data at the end of line chart smoothly.  So do you know some options that I can use in this case?
         
  $("#container").kendoStockChart({
                title: {
                    text: "My test"
                },
                dateField: "D",
                dataSource: {
                  transport: {
                      read:"url to get datas"
                  }
              },
                series:[{
                    type:"line",
                    field:"V"
                }],
                axisDefaults:
                {
                    valueAxis: {
                        labels: {
                        template: "#=value#",
                        visible: true
                    }
                    }
                },
                navigator: {
                    series: {
                        type:"line",
                        field:"V"
                    }
                }
            });


            var updatefunction = function () {

                var kendoStockChart = $("#container").data("kendoStockChart");
                var d = new Date();
                kendoStockChart.dataSource.add({"D":d.getTime(),"V":1000});
                setTimeout(updatefunction, 10000);

            };
            setTimeout(updatefunction, 10000);
Iliana Dyankova
Telerik team
 answered on 21 Feb 2013
3 answers
649 views
Hi,
I have a grid that the pageSize will be 200 if is not iPad, and page size will be 20 if is rendered on iPad.
The end product will be just to iPad and Desktop, how can I do this checking using MVC Html Helper?
@(
 Html.Kendo().Grid(Model)
 
                .Name("Grid")
                .ClientDetailTemplateId("inventoryTemplate")
 
                .DataSource(ds => ds.Ajax()
                                .PageSize(200) // or .PageSize(20) if iPad
                                .Model(m =>
                                {
                                    m.Id(p => p.StockID);
                                })
                        .Read(r => r.Action("Read", "Home"))
)
Jose
Top achievements
Rank 1
 answered on 21 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?