Telerik Forums
Kendo UI for jQuery Forum
1 answer
568 views
How can I control the content of the grouped header? I don't want the column name - I just want to format the date nicely.

Thanks
Matt
Rosen
Telerik team
 answered on 06 Aug 2012
2 answers
138 views
When I try log into console dataSource.data() (readed from remote url json data) I have an empty result (but ajax request is complete and correct), but then I try read dataSource again, the .data() is displayed, but from previous result.
// call from detailInit grid
 function getCustomer(e){
      country = e.data.COUNTRY;
      customer.read(); //datasource
      console.log(customer.data());
}

There is examples in attachments (CodeIgniter controller and view. I also use employee firebird DB to read data)
Dimm
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
358 views
hi,
i'm using the kendo datepicker but i want to add a custom validation rule to this.. how do i go about it? if i combine datepicker + validator, the validation is triggered on clicking the date calender button.
Iliana Dyankova
Telerik team
 answered on 06 Aug 2012
2 answers
263 views
//THE COMBOBOX 
 @(Html.Kendo()
                  .ComboBox()
                  .HtmlAttributes(new { style = "width: 900px" })
                  .Name("cbTscmis")
                  .Filter(FilterType.StartsWith)
                  .MinLength(3)
                  .Suggest(true)
                  .HighlightFirst(true)
                  .DataSource(source =>
                  {
                      source.Read(read =>
                      {
                          read.Action("_LoadTscmisData", "Event", new { area = "Event" });
                      }).ServerFiltering(true);
                  }))



//THE ACTION METHOD
public ActionResult _LoadTscmisData(string text)

//THE ERROR WHE THE PAGE LOADS
Object doesn't support property or method 'requestData'
Ryan Lege
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
528 views
I am using ASP.NET kendo grid helper and server binding. I want to have an anchor element with its id is the concatenated string text and the dynamic value of @item.ID, so I have something like:
cols.Bound(p => p.ID)
   .Template(@<text><a id="Foo_\@item.ID" href= "#someLink" > @item.ID </a></text>);

this code works and:

.Template(@<text><a id="@item.ID" href= "#someLink" > @item.ID </a></text>);

using bare @item.ID or with "\" or "/" or "-" and other symbols, its value is dynamic indeed,
BUT if I instead use just "Foo_@item.ID", the id resulted is as is -> "Foo_@item.ID"

What should I code in order to properly concatenate strings with @item.ID in a column template?
Thanks!
Avitot
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
167 views
Hi can you please tell me if the following approach the best for consuming the data from SQL utilizing WebService. 
The following code is working correctly. However I need to know if I'm designing dataSource correctly. At this stage I'm only intending to read the data.

DataViewModel

public class LedgerViewModel
{
    public int? lindex { get; set; }
    public int? linvoice { get; set; }
    public string lperiod { get; set; }
    public decimal? lamount { get; set; }
}

WebService

[WebMethod(Description = "Gets ledger info")]
       public List<LedgerViewModel> Read()
       {
            
           using (var db = new LedgerConnection())
           {
               return db.ledgers.Where(x => x.lmatter == "2007714")
                   .Select(l => new LedgerViewModel
                   {
                       lindex = l.lindex,
                       linvoice = l.linvoice,
                       lamount = l.lamount,
                       lperiod = l.lperiod
                   }).ToList();
           }
       }

Sample WebService Output

<ArrayOfLedgerViewModel>
  <LedgerViewModel>
    <lindex>698567</lindex>
    <linvoice>871181</linvoice>
    <lperiod>0511</lperiod>
    <lamount>0.0000</lamount>
  </LedgerViewModel>
  <LedgerViewModel>
    <lindex>698568</lindex>
    <linvoice>871181</linvoice>
    <lperiod>0511</lperiod>
    <lamount>0.0000</lamount>
  </LedgerViewModel>
</ArrayOfLedgerViewModel>

Kendo UI dataSource

dataSource: {
      transport: { }
          read: {
              url: "GetLedger.asmx/Read",
              contentType: "application/json; charset=utf-8",
              type: "POST"
          }
      },
      schema: {
          type: "xml",
          data: "/ArrayOfLedgerViewModel/LedgerViewModel",
          model: {
              fields: {
                  linvoice: "linvoice/text()",
                  lperiod: "lperiod/text()",
                  lamount: "lamount/text()"
              }
          }
      },
        sort: {
            field: "lperiod",
            dir: "asc"
        }
    }

Daniel
Top achievements
Rank 1
 answered on 06 Aug 2012
0 answers
203 views
Dear KendoUI Community,

I'am working on a WebApplication, based upon Backbone.js, Rails3 as JSON API and want now include KendoUI.

If I visit the Show-View for a selected Object (www.dogspots.de/#spots/1), my browser performs 2 JSON-Requests to the Server and I have an JS-Error: http://i48.tinypic.com/akbacn.png (Uncaught TypeError: Cannot call method 'getAttribute' of undefined)
When I disable KendoUI again, everything is fine: http://i45.tinypic.com/30t74o0.png (no JS error and 1 JSON-Request)

I believe that Backbone an KendoUI performs both an request to the server, unfortunately is KendoUI not able to parse my JSON response, which results into a JS-Error and a blank Layout

My Solution would be to disable de router-module of KendoUI and keep the work on Backbone.js. Do you agree with me?
I also tried to include your kendo.backbone.js example on github, but it doesn't changed anything.

You can also see a preview with this error on www.dogspots.de

Best regards
Gerrit
Gerrit
Top achievements
Rank 1
 asked on 05 Aug 2012
0 answers
206 views
Is the kendo upload control capable of invoking an ASP.NET webforms page method?  For instance:

        [WebMethod]
        public static string FileUpload(string id) { ... }

I see the control posting-back asynchronously, but this method is never invoked.  Here is the control creation logic:

var crudServiceBaseUrl = "Default.aspx";
 
           $("#files").kendoUpload({
               async: {
                   saveUrl: crudServiceBaseUrl + "/FileUpload",
                   autoUpload: false
               },
               multiple: false,
               showFileList: true,
           });


Dan
Daniel
Top achievements
Rank 1
 asked on 05 Aug 2012
0 answers
141 views
Hello I am testing out several UI sets for JQuery. I am really impressed with Kendo. But I am having trouble with a custom editor. I was able to get a date picker working in the grid, just not a combo box. Here is my code. It shows the box, just doesn't return the selection. I based this off your example, but can't make it work. function statusDropDownEditor(container, options) {        $('<input data-text-field="StatusName" data-value-field="StatusName" data-bind="value:' + options.field + '"/>')             .appendTo(container)             .kendoComboBox({                   dataTextField: "text",                     dataValueField: "value",                     dataSource: [                         { "text":"Open", "value":"opn" },                         { "text":"Approved", "value":"app" },                         { "text":"Declared", "value": "dec" },                         { "text":"Dispursed", "value": "dis" }                     ]});     }   This shows the drop down, however it doesn’t put the newly selected item in the field.   I am unsure as to why it wouldn’t.  Also - can I have columns protected based on the row they are on, for example on row one they are editable, but not row two? Thanks.
Dark
Top achievements
Rank 1
 asked on 03 Aug 2012
1 answer
411 views
In the below piece of code the binding seems to be one way - Model to View. However when the element value is modified the corresponding Model value is not updated. 

The Input fields load the data from the array correctly but after the data has been modified in the input fields the variables "viewModel"  and "data" are not updated. (Modify the name of Perry Sofa and click the "click" button below.)

Is there anyway I can achieve two way binding - (Model to View and View to Model)? Apologies in advance for using relative paths of the kendo and jquery js files.

<!DOCTYPE html>
<html>
<head>
    <title>Source and template binding</title>
    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
     <link href="../../../styles/kendo.common.min.css" rel="stylesheet" />
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet" />
    <script>
    var data;
    var viewModel;
    function showVM()
    {
    alert(viewModel.get('products[1].name'));
    }
    </script>
    <script id="template" type="text/x-kendo-template">
    <div>
    <input type="text" data-bind="text: name" value="${name}"></input><br>
    <input data-bind="text: unitsInStock" value="${unitsInStock}"></input><br>
    <button class="k-button" data-bind="click: deleteProduct">Delete</button><br>
</div>    
    </script>
</head>
<body>
    <div id="example" class="k-content">
    <div data-template="template" data-bind="source: products"></div>
<script>
    $(document).ready(function() {
    data = [
                { name: "Hampton Sofa", price: 989.99, unitsInStock: 39 },
                { name: "Perry Sofa", price: 559.99, unitsInStock: 17 },
                { name: "Donovan Sofa", price: 719.99, unitsInStock: 29 },
                { name: "Markus Sofa", price: 839.99, unitsInStock: 3 }
            ];
        viewModel = kendo.observable({
            products: data
        });
        kendo.bind($("#example"), viewModel);
    });
    </script>   
<input type="button" onclick="showVM()" value="click"/>
</div>
</body>
</html>
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 03 Aug 2012
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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?