Telerik Forums
Kendo UI for jQuery Forum
2 answers
343 views
Hi,

I have a field in my grid containing a DateTime. I'm displaying only the yyyy/mm/dd, but the value behind is also containing the time.

With the Format I have no problem to display the date correctly, but when i'm grouping on this column, the grouping is using the data (With the time) and not the displayed value (yyyy/mm/dd)

So my question is : Can I set the grouping to use the DisplayedValue and not the "real" data?

Here is how I format my column :
.Bound(p => p.CreationDate).Format("{0:" + CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern + "}");

Thanks
Ramiro
Top achievements
Rank 1
 answered on 07 Mar 2014
7 answers
557 views
Hi, 
Is there a way to reorder elements in the pager.
For example the "message" (i.e. "1 - 10 of 2000 items") should be on the left; pageSizes, page buttons, and page input all floated to the right. 
I found how to configure each element in http://docs.telerik.com/kendo-ui/api/web/grid#configuration-pageable, but don't see a way to control the order or use a template. If there is a way to do this via jquery, would you please provide an example. 
Thanks!
-Pavel
Quotient
Top achievements
Rank 1
 answered on 07 Mar 2014
2 answers
121 views
Hi,
is any plan for real support Knockoutjs or angular like your competitors eg Wijmo or Syncfusion ?
I'm trying to do something using knockout-kendo library but it is not working fine (sorting is not working when I'm using custom headers).
Telerik MVVM is not what is standard in many companies (i'm working on contracts) and apart from it is not supported by other library like breeze.
But the most important thing is that I'm subscribing devcraft just for support because I'm using only kendo Web and if i'm using knockout I'm loosing support.
I'm very sad because I like Kendo UI but it is very difficult working with it if you are working on more complex project.  
Thanks.
Leszek
Brandon
Telerik team
 answered on 07 Mar 2014
2 answers
120 views
I am trying to set a listview selectable, but that gives me an error.
My code:

var lv = $('#lwTest');
 
lv.kendoListView(
{
  selectable: "single",
  template: "<li><span class='email'>${email}</span> <span style='font-size: 80%; font-weight: bold'>${role}</span></li>",
  dataSource: the_items
});

This gives me the following in firebug:

TypeError: n.ui.Selectable is not a constructor

If I omit selectable, the listview will initialize correctly, but will of course not have selectable items.
100%
Top achievements
Rank 1
 answered on 07 Mar 2014
8 answers
214 views
Hello,

    I would like to use a dayTemplate  and an eventTemplate in the Month view.

    If I use the dayTemplate then the events aren't showed. I only want to change the background.

    How could I do it?

Thank you
Kyle
Top achievements
Rank 1
 answered on 07 Mar 2014
5 answers
66 views
Hi,

I have a simple login screen where user enters any username and any password... The entered values are stored in localStorage using setItem.

// Set local storage values
         localStorage.setItem("Username", username);
         localStorage.setItem("Password", password);
         localStorage.setItem("DisplayName", "Woot Woot - " + username );
         utils.navigate("#menu-view");

I then navigate to a different screen which has a ViewModel and a single property that reads the value from localStorage and displays it on the screen.

define(["kendo"], function (kendo) {
     
    return {
 
        init: function (initEvt) {},
        beforeShow: function (beforeShowEvt) {},
        show: function (showEvt) { },
        viewModel: kendo.observable({
            displayName: localStorage.getItem("DisplayName")
        })
 
    };
});


I can see from debugger that the values are correctly being stored when I click sign in, but sometimes (most times infact) when I navigate to the second screen the values are not shown, or an old value is shown.... It is kind of like I need to refresh the datamodel from localStorage when I init, beforeShow, or show the second view...

Can anyone shed any light on what I am missing... sample app developed in VS extension and available if required, but i cant attach cos it is > 2mb and not an image!!

Many thanks
Petyo
Telerik team
 answered on 07 Mar 2014
2 answers
286 views
Hi everybody,

i am starting to use kendo ui mobile and i have a problem.
I am trying to link a html select to a remote datasource.

my html:
        <select id="fromto-activity" data-value-field="id" data-text-field="name" data-bind="source: activitiesDataSource, value: selectedActivity"></select>

my javascript:
        var viewModel = kendo.observable({
            activitiesDataSource:new kendo.data.DataSource({
                transport: {
                    read: {
                        url: WEB_SERVICE_URL + "activities",
                        dataType: "json"
                    }
                }
            }),
            selectedActivity: "2"
        });

        kendo.bind($("#fromto-activity"), viewModel);

the service returns json:
        [{"id":1,"name":"Name1"},{"id":2,"name":"Name2"}]

The select element is filled with the data of the service.

The Problem is, that the value selectedActivity isn't bound to the select element.

When I add data-role="dropdownlist", everything works fine. But I don't want that, because I want to develop a mobile app and want to use the html select element with his styling.

When I don't use a remote data source, then everything works fine too. For example with this datasource:
     activitiesDataSource:[
          { id: 1, name: "Name1" },
          { id: 2, name: "Name2" },
          { id: 3, name: "Name3" }];

Could anybody tell me, what's mistake?
                              ],

Chris
Top achievements
Rank 1
 answered on 07 Mar 2014
6 answers
1.0K+ views
Q1:

I have a number field in my DataSource used in the Kendo grid for bytes. It is usually in the MB or GB range. Is there a simple way to change the format from 343,243,343 to "343.2 MB" and the same formatted help I need with the GroupFooter (where I don't see how to go from the documentation on formatting:  to something I put in the footer). Here is what I have right now:

{
    field: "size",
    aggregates: ["min", "max", "sum"],
    format: "{0:n0}",
    groupHeaderTemplate: GridData.gridHeader,
    groupFooterTemplate: "total: #: sum #, min: #: min #, max: #: max #"
},


Q2: (very related)

I also need a little help getting the same formatting rules into the groupFooter, but this time for a date, I want the same formatting I have in the column, to be used in the GroupFooter:

{
    field: "date",
    aggregates: ["min", "max"],
    format: "{0:dd-MMM-yyyy H:m:ss}",
    groupHeaderTemplate: GridData.gridHeader,
    groupFooterTemplate: " min: #: min #, max: #: max #"
},





Dr.YSG
Top achievements
Rank 2
 answered on 07 Mar 2014
1 answer
220 views
Hi

I'm a bit confused, some say Kendo UI Scheduler can be used for free but it seems to me I can only download and use a 30 day trial? 

Can I use Kendo UI Scheduler for free like forever in my own project or not?

Thanks in advance!
Deni
Telerik team
 answered on 07 Mar 2014
16 answers
780 views
I have a grid, where the first column changes size when its being sorted.  No other column has this issue.  The issue persists when I specify a column width attribute as well.  Attached are screen shots.

Here is my grid definition:

this.qrList = $("#grid1").kendoGrid({
dataSource : this.ds,
sortable : {
mode : "single",
allowUnsort : false
},
selectable : "row",
pageable : {
buttonCount : 5
},
scrollable : false,
rowTemplate : _.template(QRListRow),
columns : [ {
field : "id",
title : "ID",
headerAttributes : {
"class" : "gridHeader"
}
}, {
field : "name",
title : "Name",
headerAttributes : {
"class" : "gridHeader"
}
}, {
field : "customerName",
title : "Customer",
headerAttributes : {
"class" : "gridHeader"
}
}, {
field : "createDate",
title : "Created",
headerAttributes : {
"class" : "gridHeader"
}
}, {
field : "dueDate",
title : "Due",
headerAttributes : {
"class" : "gridHeader"
}
}, {
command : {
text : "View Details"
},
title : " "
} ],
pageable : true,
navigatable : true
});

In addition, I use an underscore template for the row template:

<tr class="qrGridRow">
<td><%= id %></td>
<td><%= name ? name : '' %></td>
<td><%= customerName %></td>
<td><%= moment(new Number(createDate)).format('MMM D, YYYY') %> <span class="gridTime"><%= moment(new Number(createDate)).format('[at] h:mm a') %></span>
</td>
<td>
<% if(dueDate) { %>
<%= moment(new Number(dueDate)).format('MMM D, YYYY') %>
<% } else { %>
&nbsp;
<% } %>
</td>
<td>
<a class="viewDetails btn-mini btn btn-info" href="#view-qr<%= id %>"><i class="icon-eye-open icon-white"></i> View Details</a>
</td>
</tr>

Any idea why it abruptly resizes?

Note, you can see the discrepancy when you move from unsorted to sorted.
Doug
Top achievements
Rank 1
 answered on 07 Mar 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
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?