Telerik Forums
Kendo UI for jQuery Forum
1 answer
161 views

Hi,

I am trying to set a default value of today in my datetimepicker.  However, it will not allow me to change the date time format from "Tue Feb 3 13:54:54 EST 2015" format which I an unable to convert in the c# code.  Here is my javascript code:
var startDateString = '';
$("#start-date-datepickerId").kendoDateTimePicker({
value: new Date(),
change:
function () {
startDateString = kendo.toString(
this.value());
},
 
format: "0:MM/dd/yyyy"
 
});

if (startDateString == '')

startDateString = kendo.parseDate($("#start-date-datepickerId").data("kendoDateTimePicker").value());

Any and all help is appreciated

Alexander Popov
Telerik team
 answered on 05 Feb 2015
2 answers
219 views
Following this(http://blogs.msdn.com/b/lightswitch/archive/2013/04/22/create-dashboard-reports-with-lightswitch-webapi-and-serverapplicationcontext.aspx) fantastic article I am able to bind a Kendo grid to  my data using Web API. However I am having difficulties enabling the server side paging, sorting, filtering etc. I have enabled the required options at client side but when I perform a filtering or sorting the fiddler shows no extra parameter are being sent. There are some examples using ASP/MVC wrappers but I have the license of plain HTML/JS version of Kendo UI not the ASP/MVC one.

Here is the get method of my controller:
 Public Function GetValues() As Object
Try
Dim query =
From c In dws.ApplicationData.ContactAddresses
Select c.Id, c.Address, c.Town, c.City, c.PostCode

Return query.Execute()
Catch ex As Exception
Throw ex
End Try
End Function

Here is the client side JS:

myapp.ContactAddressesBrowseKendo.grdOdata_render = function (element, contentItem) {
var gridContainer = $('<div id="grdOdata" />');
gridContainer.appendTo($(element));

var dataSource = new kendo.data.DataSource({
type: "odata",
transport: {
read: function (items) {
//make json request
$.ajax({
url: "../api/ContactAddresses",
dataType: "json",
success: function (result) {
items.success(result);
},
error: function (result) {
items.error(result);
}
});
},

parameterMap: function (options, type) {
var paramMap = kendo.data.transports.odata.parameterMap(options);
if (type == "read") {
return {
$top: data["value"].take,
$skip: data["value"].skip
}
}
return paramMap;
}
},
schema: {
model: {
fields: {
id: "Id",
Id: {
type: "number",
editable: false,
nullable: true
},
Address: { type: "string" },
Town: { type: "string" },
City: { type: "string" },
PostCode: { type: "string" }
}
},
//--------------------------------------------------------------
data: function (data) {
return data;
},
total: function (data) {
return data.length;
}

},
pageSize: 20,
serverPaging: true,
serverFiltering: true,
serverSorting: true
});

gridContainer.kendoGrid({
dataSource: dataSource,
height: 550,
groupable: true,
dataBound: function (o) {
//------------------------------
//Hide groupped columns
//------------------------------
var g = gridContainer.data("kendoGrid");
for (var i = 0; i < g.columns.length; i++) {
g.showColumn(i);
}
$("div.k-group-indicator").each(function (i, v) {
g.hideColumn($(v).data("field"));
});
g.hideColumn("Id");
//------------------------------
},
toolbar: ["create", "save", "cancel"],
editable: true,
scrollable: false,
pageable: true,
filterable: true,
sortable: true,
resizable: true,
selectable: true,
columns: [{
field: "Address",
title: "Address"
}, {
field: "Town",
title: "Town"
}, {
field: "City",
title: "City"
}, {
field: "PostCode",
title: "Post Code"
}, {
field: "Id",
title: "ID"
}]
});
};
Divyang
Top achievements
Rank 1
 answered on 05 Feb 2015
2 answers
349 views
Hi,

I have a bottom sidebar on the page. That sidebar can be turned on and off by user. I need to decrease height of scheduler when sidebar is turned on. Is it possible?

Regards,

Pawel
Colin
Top achievements
Rank 1
 answered on 05 Feb 2015
1 answer
164 views
I use AngularJS and Kendo controls with app which sadly must support IE8. Of course, there is a problem with unrecognized by IE8 JS functions (as indexOf etc.), but I have defined them with the code from this topic: http://stackoverflow.com/questions/26978533/angularjs-1-3-page-wont-load-in-ie8

But even so, when it comes to initialization of Kendo Grid, I receive this error: 

Type error: Object doesn't support property or method "split" <div class=ng-scope ng-view ng-app="rawMaterial">
{
      description:  "Object doesn't support property or method "split"",
      message: " Object doesn't support property or method "split"",
      name: "TypeError",
      number: -2146827850
}
   "<div class=ng-scope ng-view ng-app="rawMaterial">"

The div, which calls the module, looks like this: <div ng-app="rawMaterial" ng-view></div>
Tomek
Top achievements
Rank 1
 answered on 05 Feb 2015
7 answers
194 views
Hi Telerik,

i have a databound grid and Actionsheet on it. I need to know the context (id) of the grid row and then proceed the action.
Basically I need a grid version of http://demos.telerik.com/kendo-ui/actionsheet/angular.

Probably I need to use the k-actionsheet-context. But how?

Regards,
Ladislav
Alexander Valchev
Telerik team
 answered on 05 Feb 2015
1 answer
496 views
I am developing single page application with angularJs, the application uses JWT Authorization headers to authenticate with my MVC web API. I recently integrated Kendo into the application but i noticed that my AngularJs request interceptor is not able to intercept calls generated from kendo grid .

Is there a common place where i can intercept http requests initiated from Kendo grid and other kendo components . so that i can add Authorization Header ?

here is my inerceptor
['$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push('authInterceptorService'); }]


function addToken(config) {

            var token = tokenStoreFactory.getToken();
            if (token) {
                config.headers = config.headers || {};
                config.headers['Authorization'] = 'Bearer ' + token;
            }
            return config;
        }

Petur Subev
Telerik team
 answered on 05 Feb 2015
9 answers
858 views
Two things; can I allow only one detail template expanded at a time AND when it's expanded, can I scroll the row/detail template to the top of the scroll area?

Thank you!

j
jeff
Top achievements
Rank 1
 answered on 04 Feb 2015
1 answer
74 views
Hi,

I am using kendoui asp.net mvc wrapper. I wanted to do server side paging therefore set ServerProcessing as true in datasource. In the controller I only have code to process only pagination not others. Things like sort, filter etc I need to be able to do them at client side. In simple words, I want to selectively server processing/client processing for grid features (pagination, sorting, filter). Is that possible?

Thanks,
Qamar
Rosen
Telerik team
 answered on 04 Feb 2015
5 answers
119 views
Hi

I have two elements in one cell using the return function for this particular field:

function(dataItem) {
       return kendo.htmlEncode(dataItem.Title) + "<br>" + kendo.htmlEncode(dataItem.City);
}

The filter does not work anymore, for example searching for "lon" (as in London) does not return any results.

http://dojo.telerik.com/ukOja/9

Mant thanks
Rosen
Telerik team
 answered on 04 Feb 2015
1 answer
188 views
Hi, here is my sample page: http://grumpydesign.com/kendo/date-filter.html

I have 2 issues.

1. How do I customize the filter to just have a date range?

Something like: "between [date] and [date]"

Second, even the filter that's there is not working, I think it's because my JSON is returning the data as a date object, and then I convert it into a string.

I'm totally confused, help!

William
Alexander Popov
Telerik team
 answered on 04 Feb 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?