Telerik Forums
Kendo UI for jQuery Forum
1 answer
103 views
In the documentation here:

http://docs.kendoui.com/api/framework/datasource 

You state under the transport.update section (and probably read, create and delete too) you state:

var dataSource = new kendo.data.DataSource({
    transport: {
        update: function(options) {
            // make AJAX request to the remote service
 
            $.ajax( {
                url: "/orders/update",
                data: options,
                success: function(result) {
                    // notify the DataSource that the operation is complete
 
                    options.success(result);
                }
            });
        }
    }
});

It should say "data: options.data," not "data: options,".


Atanas Korchev
Telerik team
 answered on 30 Jul 2012
0 answers
163 views
We have a scenario where we want to ease into Kendo UI, but have a project that needs to remain on ASP.NET 2.0 Web Forms for a good few months before upgrading (it will still be web forms for a while, before the MVC move).

Basically we need to have a Kendo UI grid initialized with seed data in the form of JSON and allow the user to perform Pop-up Inline Editing (like http://demos.kendoui.com/web/grid/editing-popup.html), but without saving that data back to the server after each edit.  

The user's need to have the ability to see their changes in the data immediately reflected in the grid, but we plan on trying to fit this into a post-back styled architecture by reading the JSON data from the datasource (after it's updated with changes from the user) and copying that to a hidden field which can by POSTed back to a form location (and later on we can change this action to send data to a web service).

Are there any examples of a Kendo UI Grid where the data is edited locally and read out into something (e.g. copied to another JavaScript variable or hidden form field) on item/row update without interacting with a service boundary?

It would greatly ease the decision if something similar or exactly this scenario could be posted/provided on this thread showing that Kendo UI can work with this.

Thanks!
jgill
Top achievements
Rank 1
 asked on 30 Jul 2012
1 answer
127 views
Has anyone had an issue with the datasource calling the same paging over and over? I am trying to come up with a simplified version to test this theory. But here is my code for creating the dataset:

ds = new kendo.data.DataSource(
         {
             transport: {
                 read: { url: params.readPath }
                
             },
             serverPaging: true,
             serverSorting: true,
             pageSize: 100,
             schema: {
                 id: "c0",
                 data: "results",
                 total: "count",
 
                 parse: function(data) {
 
                     params.fields = data.fields;
 
                     params.onSuccess(params);
 
                     return data;
                 }
             }
         });
     ds.read();

When I run this, it just hits the service over and over for pages 1 to 100. Any ideas?
Jonathan
Top achievements
Rank 1
 answered on 29 Jul 2012
0 answers
201 views
Hello,

I have a grid bound to a view model array property.

 I am adding new items asynchronously to the array and it works, they are getting displayed in the grid.

However, I see that the grid is adding columns for EVERY property of the item object, even if I specifically set the columns with the fields:

 $(document).ready(function () {
            $("#battleGrid").kendoGrid({
                columns: [
                                      {
                                          title: "Title",
                                          field: "Title"
                                      },
                                      {
                                          title: "Map",
                                          field: "Map"
                                      }]
            });


            $("#battleGrid").kendoGrid({
                selectable: "row"
            });
        });


$(function () {
            viewModel = kendo.observable({

                battles: [],


                addBattle: function (battle) {
                    this.get("battles").push(battle);
                },
            });

            // apply the bindings
            kendo.bind(document.body.children, viewModel);
        });

 <div id="battleGrid" data-role="grid" data-sortable="true" data-bind="source: battles"
                    style="height: 700px">
                </div>

The grid shows 5 columns instead of 2.

This looks very bad, I hope there's a solution.

How can I tell the grid to stop auto generating the columns and create only specific columns?


Thanks!
Andrew
Top achievements
Rank 1
 asked on 29 Jul 2012
0 answers
128 views
Hi can anyone let me know how to design a Clustered stack bar chart.
I have already designed stack barchart, but having no idea on clustered stack bar chart.?
nitin
Top achievements
Rank 1
 asked on 29 Jul 2012
2 answers
284 views
Hi Telerik team,

I have a requirement where I would need to let user to select all rows in the grid , by clicking a checkbox , Select/UnSelect All.  Which selects all rows. Click a button, that will take action on the selected rows.
1. Do you have sample reference to do this?

Thanks,
Peruri
Mike
Top achievements
Rank 1
 answered on 28 Jul 2012
1 answer
188 views
In the Kendo Web UI MVVM example (index.html), if you would like to see the kendoComboBox object with value and description bindings instead of the browser's select element, just paste this over the existing script tag in the body of index.html.  Hope this helps someone.

<script>
     $(document).ready(function () {
         var genderCollection = [{ description: "Guy", value: "Male" }, { description: "Girl", value: "Female"}];
         var genderElement = $("#gender");
 
         $(genderElement).width(($("#fname").width() + 2));
         $(genderElement).css("margin-left", "-2px");
         $("#gender").kendoComboBox({ dataValueField: "value", dataTextField: "description" });
 
         var viewModel = kendo.observable({
             firstName: "John",
             lastName: "Doe",
             genders: genderCollection,
             gender: "Male",
             agreed: false,
             confirmed: false,
             register: function (e) {
                 e.preventDefault();
                 this.set("confirmed", true);
             },
             startOver: function () {
                 this.set("confirmed", false);
                 this.set("agreed", false);
                 this.set("gender", "Male");
                 this.set("firstName", "John");
                 this.set("lastName", "Doe");
             }
         });
 
         kendo.bind($("#example"), viewModel);
 
     });
 </script>

Dan
Long
Top achievements
Rank 1
 answered on 28 Jul 2012
2 answers
192 views
Hi All,

Has anyone experienced the Kendo UI from MVVM pattern? I would like to see the pitfalls in this decision. So that I would be ready for the unexpected.

Thanks for reading
Long
Top achievements
Rank 1
 answered on 28 Jul 2012
0 answers
218 views
Can someone tell me why this is an invalid template

<script type="text/x-kendo-template" id="recordtemplate">
    <center><h2>#= ActivityName #</h2></center>
@using (Html.BeginForm("recordcompletedactivity","engage"))
{
@(Html.Kendo().DatePicker()
.Name("DateCompleted") 
.Min(new DateTime(1900, 1, 1)) 
.Max(new DateTime(2099, 12, 31))
.Format("MMddyyyy")
.Value(DateTime.Now.ToString()));
@Html.CheckBox("Attest", new { @class = "cb" });
@Html.Encode("Check here to confirm completion this activity");
<br/><br/>
<center>
<input type="submit" class="submit" name="Button" value="Submit" />
</center>
}
</script>


i get the following error
Uncaught Error: Invalid template:' <center><h2>#= ActivityName #</h2></center> <form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script> jQuery(function(){jQuery("#DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n <center><h2>'+( ActivityName )+'</h2></center>\t\n<form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script>\n\tjQuery(function(){jQuery("';DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ;o+=;}return o;' 
bob
Top achievements
Rank 1
 asked on 27 Jul 2012
0 answers
133 views
I'm displaying records from a DB in a kendo grid, and one DB field is a datetime.

I'm using the following to display the value: kendo.toString(datetime,"dd MMMM yyyy, h:MM:ss")

This works, but the time it displays is incorrect. For instance if the value in the DB is "2012-07-27 15:28:11.383" the value displayed will be "27 July 2012, 3:07:12", which is off by about 21 minutes.

What's up with that?
David
Top achievements
Rank 1
 asked on 27 Jul 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
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
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
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?