Telerik Forums
Kendo UI for jQuery Forum
1 answer
101 views
Hi,
The following is my (coffee) datasource code excerpt:

schema:
  model:
    id: 'id'
transport:
  destroy:
    url: (model) -> ApiUrl "transmittals/transmittal/#{model.id}"
    type: 'DELETE'
    data: {}

A few things:
.I'd expected the destroy to use type = delete by default, no?
.I'd expected it to add the id to the url itself - do i have to inject it myself (like above)?
.Currently kendo is sending my entire model along with the request, ho can i prevent that?
Alexander Popov
Telerik team
 answered on 11 Jun 2014
1 answer
272 views
i was following the tutorial from
http://demos.telerik.com/aspnet-mvc/listview/editing

and i keep on getting this error,
Unhandled exception at line 9, column 6976 in http://localhost:50879/Scripts/kendo/2014.1.528/kendo.all.min.js

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'replace': object is null or undefined

most of thread with similar question are asked to check for the duplicate jquery files so i checked mine and seems ok.

 can any one help pls.

my code as below
===============BundleConfig.cs====================

        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/modernizr-2.6.2.js",
                "~/Scripts/jquery-1.10.2.min.js",
                "~/Scripts/bootstrap.min.js"
                )
                );

            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                "~/Scripts/kendo/2014.1.528/kendo.all.min.js",
                //"~/Scripts/kendo/2014.1.528/kendo.timezones.min.js",
                "~/Scripts/kendo/2014.1.528/kendo.aspnetmvc.min.js"));

            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
            "~/Content/kendo/2014.1.528/kendo.common-bootstrap.min.css",
            "~/Content/kendo/2014.1.528/kendo.bootstrap.min.css"));

            bundles.IgnoreList.Clear();
        }
===============================_Layout.cshtml===================

@using System.Web.Optimization
@*@using Telerik.Web.Mvc.UI*@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @*<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />*@
    @*@Html.Telerik().StyleSheetRegistrar().DefaultGroup(group =>group.Add("telerik.common.css").Add("telerik.vista.css"))*@
   
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")
     @Styles.Render("~/Content/kendo/css")
    
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                </ul>
            </div>
        </div>
    </div>

    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
    </div>
   
    
    @*@Html.Telerik().ScriptRegistrar() *@
</body>
</html>





Sebastian
Telerik team
 answered on 11 Jun 2014
1 answer
353 views
The long date format on calendar for several cultures does not respect the local format.

Cultures having problem are : zh-tw, ko-kr, ja-jp, pt-pt, pt-br, es-es, es-co, es-cl, fr-ca
 
The expected behavior for different cultures are  as:
       For zh-tw/ko-kr/ja-jp markets, the "MM" are displayed in front of "YYYY" instead of displayed after "YYYY". 
       For pt-pt/pt-br/es-es/es-co/es-cl markets , lacked "de" between "MM" and "YYYY".
       For fr-ca market, lacked "," between "MM" and "YYYY".

Is this the bug with Kendo? How can we fix this?
Georgi Krustev
Telerik team
 answered on 11 Jun 2014
1 answer
337 views
Hi,

I wish to have file upload control within kendo window dialog box. We are using angularjs and on kendo-angular labs page, I can't find file upload control present.

Is it possible to have file upload control on kendo window pop-up dialog? If yes, Can you share a sample?

Thanks!
Atanas Korchev
Telerik team
 answered on 11 Jun 2014
3 answers
709 views
I have a 3 level hierarchical Kendo grid with command columns that invoke long-running JavaScript Ajax functions that invoke Controller methods which in turn act on database tables.  I'm trying to show a wait cursor so the user has a visual cue that the system is busy and is waiting for a response from the server.  Kendo grid CSS seems to be overriding my attempt to show and clear the wait cursor.  How can I make this work properly?

My Javascript method is shown below:

function onClickPostBatch(e) {
    var dataItem = this.dataItem($(e.target).closest("tr"));
    //document.body.style.cursor = "wait";
    $("html").css("cursor", "wait");
      $.post('@Url.Action("PostBatch", "Home")', {
         batchId: dataItem.BatchID
     }, function (data) {
         if (data.error) {
            alert('' + data.message);
        } else {
            alert(data.message);
            location.reload();
        }
     });
    //document.body.style.cursor = "default";
    $("html").css("cursor", "default");
 }


Thanks!

Rich
Kiril Nikolov
Telerik team
 answered on 11 Jun 2014
2 answers
175 views
I am trying use KendoUI javascript library to implement a web dashboard. I have implemented the view functions by getting data from a XML web service and it all works well. But got stuck when I try to introduce edit features.My KendoGrid's datasource schema is as 

schema: {
                type: "xml",
                data: "/xmlResponse/Contacts/Contact",
                model: {
                    id: "NameSequence",
                    fields: {                          
                        name: "Name/text()",
                        phoneNumber: "PhoneNumber/text()",
                        email: "Email/text()",
                        nameSequence: "NameSequence/text()"                        
                    }
                }  
            }



Since i have to map the XML tags to fields in the model fields, how should I specify parameters like editable, nullable or validations. Documentation doesn't provide any help on this. Samples are like below but they only talk about json transports.

schema: {
           model: {
                     id: "ProductID",
                     fields: {
                              ProductID: { editable: false, nullable: true },
                              ProductName: { validation: { required: true } },
                              UnitPrice: { type: "number", validation: { required: true, min: 1} },
                              Discontinued: { type: "boolean" },
                              UnitsInStock: { type: "number", validation: { min: 0, required: true } }
                    }
           }


I want to combine the both worlds and don;t have a clue on how to do that.

Any help would be great...


Vladimir Iliev
Telerik team
 answered on 11 Jun 2014
3 answers
1.2K+ views
Hi:

I would like to add my own methods on the to ListView as follows:
$("#AlertListView").kendoListView({
     dataSource: {
        data: []
    },
    template: "<li>#: message #</li>",
    displayMessages: function( messages ) {
        ...
    },
    hideMessages: function( ) {
        ...
    }
});

Phil

Alexander Valchev
Telerik team
 answered on 11 Jun 2014
3 answers
263 views
Hi,

We are using the Kendo grid for angular, we are having issue with the date format -
We have tried below 2 ways and neither works:
          $scope.dbColumns = [               
                {"field": "date",
                    "sortable": true,
                    "title": "First date",
                    "template": "#= kendo.toString(dateFirst, '{0:dd-MMM-yyyy}') #"
                },                
                {
                    "field": "dueSecond",
                    "sortable": true,
                    "title": "Second date",
                    "type": "date",
                    "fomrat":"{0:dd-MMM-yyyy}"
               }];
  Both cases we get the format as => 2014-05-30T11:13:51.6006636-04:00











Siddhartha
Top achievements
Rank 1
 answered on 10 Jun 2014
1 answer
181 views
Here is the situation. I've 2 views: grid-view and add-view. When page loads, grid-view is visible. By clicking on "New" button, add-view comes into the picture. Both views are into the layout.Here's the code:

var customerSearchLayout = new kendo.Layout($('#customer-search-view-template').html());
    customerSearchLayout.render($("#searchCust"));
 
    var addCustomerView = new kendo.View($('#add-customer-view-template').html());
        var customerGridView = new kendo.View($('#customer-grid-view-template').html());
        var layout = new kendo.Layout("<div id='content' class='contentDiv'></div>");
 
        layout.render($("#main")); 
        layout.showIn("#content", customerGridView);

"New" button is inside customer-search-view-template.

var customerSearch = kendo.observable({
        customerName: "Customer name",
 
        searchClicked: function() {
            this.set("customerName", "Search clicked");                    
        },     
        newClicked: function(e){
              e.preventDefault();
              this.trigger("newCustomerClicked");
        }  
    });
 
    customerSearch.bind("newCustomerClicked", function(){
        layout.render($("#main"));
        layout.showIn("#content", addCustomerView, "swap");
    });
 
    // Bind the view model to the customer element.
    kendo.bind($('#searchCustomer'), customerSearch);

When "New" button is clicked, it triggers newCustomerClicked event and displays add-view. add-view has a form to add a new customer. The form is nested inside a <div>.

<form id="addCustForm">
<label for="txtFname">First name</label>                       
<input id="fname" data-bind="value: firstName" class="k-textbox"  />
</form>
 
// observable object of add customer
    var customerAdd = kendo.observable({       
        firstName: "Hello world!"
    });
 
    // Bind the view model to the customer element.
    kendo.bind($('#addCustForm'), customerAdd);

Each template has a wrapping element.

I've tried to bind viewmodel customerAdd with form, with parent div, with container div but none of these worked.
I couldn't figure out what is the issue with binding here.
So, how do I bind viewmodel customerAdd with form ?????

Petyo
Telerik team
 answered on 10 Jun 2014
3 answers
182 views
Hi Telerik team,

I'm a new bie in ASP.net MVC and telerik. When i create my project, i met the problem in multicolumn in combobox like your demo at : http://demos.telerik.com/aspnet-mvc/combobox/template... I don't attach the headertemplate because i don't need the title of column. But it cannot run when i add template ..hope your suggestion.

here is test.cshtml file:
@(Html.Kendo().ComboBox()
          .Name("test")
          .DataTextField("Category")
          .DataValueField("Category")
          .Filter("startswith")
          .MinLength(1)
          .HtmlAttributes(new { style = "width:250px" })
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetCategory", "User");
              })
              .ServerFiltering(false);
          })
              .Template("<span class=\"k-state-default\">#: data.Category #</span>" +
                        "<span class=\"k-state-default\">#: data.ProductID #</span>")
)

and the getcategory method in  usercontroller:

public JsonResult GetCategory()
        {
            var a = new DataClasses1DataContext().Dat_Hangs.Select(b => new OrderViewModel
            {
                ProductID = b.ProductID,
                ShopID = b.ShopID,
                OID = b.OID,
                Category = b.Category,
                Quantity = b.Quantity,
                Price = b.Price
            });

            return Json(a, JsonRequestBehavior.AllowGet);
        }


Dimiter Madjarov
Telerik team
 answered on 10 Jun 2014
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?