Telerik Forums
Kendo UI for jQuery Forum
1 answer
149 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
232 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
139 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
295 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
235 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
215 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
234 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
164 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
0 answers
114 views
Hi,

I have an object in my Model that must be bounded to two ViewModels. This object is loaded with ajax from the server.

This object must be  bounded to two regions of my screen that have, each one, different ViewModels. I would like that when the response arrives from my Ajax service the two widgets, bounded to my ViewModels, be updated.

How can I do this.

Thanks
mvbaffa
Top achievements
Rank 1
 asked on 27 Jul 2012
4 answers
363 views
OK, not exactly a question on ListView per se, but spinning wheels for some reason on this guy.

I have the following template and ListView on a page:
$("#top3").kendoListView({
                dataSource: dataSourceCustomers,
                template: kendo.template($("#top3template").html())
});
 
 
<script type="text/x-kendo-tmpl" id="top3template" >
        <div class="top3item">
            <dl class="subtitle">
                <dt><b>${CustomerName}</b></dt>
                <dd>${kendo.toString(Value, "c")}</dd>
            </dl>
        </div>
     
</script>

What I'm looking for is a way for format the FIRST item on the list returned (bold, diff color, etc.).  It sounds simple enough I should be able to do it with jQuery alone, but its just not coming to me.  Any ideas on formatting the first item returned?  Thanks in advance for the help!
Iliana Dyankova
Telerik team
 answered 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?