Telerik Forums
Kendo UI for jQuery Forum
6 answers
203 views
hi all
im try use kendoui ,im feel kendoui and other html components(for example text,textarea )different,how to cancel kendui style,To make it look and ordinary?pls help me ,thanks.
Dimo
Telerik team
 answered on 19 Mar 2015
1 answer
507 views
I'm trying to use a "tab" to grab the currently highlighted item in the dropdown and populate it into the the text field. However, I'm having 2 separate problems with this.

The first is that I cannot get the "tab" key's default action to stop from firing. I have tried capturing the keydown even from my MultiSelect box's input field using the following code:

$("#myInput").data().kendoMultiSelect.input.on("keydown",function(event) {
        var code = event.keyCode;
 
        if (code == 9) { //9 is the keyCode for Tab
            event.preventDefault();
        }
}

Using this code, the focus is still moved from the input to the next item on the page and is not giving me the desired functionality of doing nothing when tab is pressed.

My next problem is the fact that I cannot find how kendo determines which item in the list of filtered items is highlighted. I don't see any properties being set when you use the arrow keys to highlight the input you want from that list. I would like to get the displayed text inside that highlighted item and populate it into the text input area when I press tab. Currently I cannot figure out how to figure out how to get the item without selecting it with a click or hitting enter while it is highlighted.

Help with either or both of these would be extremely appreciated.
Georgi Krustev
Telerik team
 answered on 18 Mar 2015
3 answers
434 views
The drop down list is not setting it's value when the value is zero (data-value="0") and I'm not sure why.  The seems to treat the values as numeric instead of a string.  Please see the example:

http://dojo.telerik.com/UroFA

Georgi Krustev
Telerik team
 answered on 18 Mar 2015
3 answers
173 views
Hi,

I'm trying to link a KendoGrid to a WCF service using DataServices & Odata. My requests past JSON but the request formats are ODATA format (i.e. update: myservce.svc/TimeLog(1))

For some reason thought I have been unable to get the KendoGrid to work with the service, I can load data no problem but the Create & Updates don't work, markup below for KendoGrid DataSource:

  $("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: http://localhost/myservice.svc/TimeLog_View,
//type: "GET",
dataType: "json"
},
update: {
                                                       url: function (data) {
return "http://localhost/myservice.svc/TimeLog" + "(" + data.Id + ")";
},
contentType: "application/json; charset=utf-8",
dataType: "json",
//type: "POST"


},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
}
},
schema: {
data: function (data) {
return data.value;
},
total: function (data) {
return data['odata.count'];

},
model: {
id: "Id",
fields: {
Id: { type: "number", editable: false, nullable: true },
SOW_Id: { type: "number", editable: false },
Type_Id: { type: "number", defaultValue: 1, validation: { min: 1, required: true } },
//Type_Name: { type: "text", editable: false },
Description: { type: "text" },
EstimatedHours: { type: "number" },
Rate: { type: "number", defaultValue: 225 },
Cost: { type: "number", editable: false },
LoggedHours: { type: "number", editable: false },
AdjustmentHours: { type: "number", editable: false },
CompletedHours: { type: "number", editable: false },
RemainingHours: { type: "number", editable: false },
CreationDate: { type: "date", editable: false },
CreationUser: { type: "text" },
ModifiedDate: { type: "date" },
ModifiedUser: { type: "text" }
}
}
},
//batch: true,
pageSize: 15,
serverPaging: true,
serverFiltering: true,
serverSorting: true


Can anyone point me in the right direction for what I need to do? I have searched the forms and examples but none that I've found solve the problem I'm having

Thanks,
Petur Subev
Telerik team
 answered on 18 Mar 2015
1 answer
150 views
Good afternoon.

How to work with UTC time?

Now I have the following problem from the server response "2014-11-26T18: 52: 48", after the change in the Diagram, is sent to the server in the format "2014-11-26T18: 52: 48Z" and In diagram displays + 2 hours in change the task.

Thank you for your help.
Igor
Top achievements
Rank 1
 answered on 18 Mar 2015
6 answers
127 views
Hello,

We have a big requirement that would basically involve flipping the rows and columns of a grid so the client can view data in a spreadsheet like way.  For example if we have:

Header1 Header 2
Data1       Data2
Data3       Data4

We want:

Header1 Data1 Data3
Header2 Data3 Data4

We have been researching the forums but cant find a standard way to do this.  If this is possible with the kendo grid with custom templates or another control can you please point us in the right direction?

Thanks!
Paul
Top achievements
Rank 1
 answered on 18 Mar 2015
3 answers
62 views
Hi All

I just finished struggling with a resize directive and thought it can be useful to others.

(function () {
    'use strict';
 
    //resize Grid directive
    angular.module('app.core').directive('resize', function ($window) {
        return function (scope, element, attr) {
            var offsetH = attr.resize; //what offset will be removed from the grid height
            var pct = 100; //what % of the page the grid will occupy
 
            if (attr.resizeRatio) { //sets the pct incase it was set in markup
                pct = attr.resizeRatio;
            }
            var w = angular.element($window);
            scope.$watch(function () {
                return {
                    //Used when the window size has changed
                    'height': window.top.innerHeight,
                    'width': window.top.innerWidth,
                    //Used for initialization when the grid has not been rendered and height is 0 triggers the function once the grid is rendered
                    'elementHeight': element.height(),
                    'elementWidth': element.width()
                };
            },
                          function (newValue, oldValue) {
                              for (var i = 0; i < element[0].attributes.length; i++) {
                                  switch (element[0].attributes[i].name) {
                                      case "kendo-grid":
                                      {
                                              //Get Grid data area
                                              var dataArea = element.find(".k-grid-content");
                                              //Calculate the new grid height
                                              var newHeight = (newValue.height * pct / 100) - offsetH;
                                              //Calculate the difrence between the grid to the data area
                                              var diff = element.innerHeight() - dataArea.innerHeight();
                                              //Set new grid height if height is diffrent then the crrent
                                              if (element.height() != newHeight) {
                                                  element.height(newHeight);
                                                  dataArea.height(newHeight - diff);
                                              }
                                              break;
                                          }
                                      case "kendo-splitter":
                                          {
                                              //Calculate the new grid height
                                              var newHeight = (newValue.height * pct / 100) - offsetH;
                                              element.height(newHeight);
                                              break;
                                          }
                                  }
                              }
 
                          },
                          true);
 
            w.bind('resize', function () {
                scope.$apply();
            });
        }
    });
})();

Enjoy 
Kiril Nikolov
Telerik team
 answered on 18 Mar 2015
1 answer
79 views
I am using a kendoGrid with a local data source that is updated when new data is available. This works fine. I recently added row details so I can expand a row and look at the data which also works fine. The issue is that whenever I get an update from the server (that in turn adds records to the DataSource) any row details that are expanded collapse. This is kind of annoying when you are trying to look at the data...

Any idea how to keep the details from collapsing when the DataSource is updated?

Thanks
Dave
Alexander Popov
Telerik team
 answered on 18 Mar 2015
4 answers
361 views
Hi all!.

I have really strange problem. I use jQuery (1.11.2) and most recent Kendo Mobile UI.

My app is built from two .html pages. Simplified code below:

Page 01 has code:
<div data-role='content'>
   <a href="Fitter/Register.html" data-role="button">Register here!</a>
</div>

Page 02 has code:
<div data-role='content'>
   <p id='javascriptOnClickRemoveContentOfThisDiv'>Java<p>
</div>

as you can see, both Register button and Paragraph are at the same position on screen although on different views. Now the strange thing that happens here is that user will click on Register here! button, Kendo will switch the view to Page02 and Java text from Paragraph is being removed by javascript function (below), so it looks like Register here! fires twice firstly on Page01 (as supposed) and then on Page 02 (why? - delayed event?, also it's not happening on all Android devices - just on some):
$('javascriptOnClickRemoveContentOfThisDiv').click(function() {
     this.html('');
});

Petyo
Telerik team
 answered on 18 Mar 2015
4 answers
263 views
If I bulid the grid with Model, it is working. But If I Pass the same model to the partial, it is not working. It is throwing an error message saying.The model item passed into the dictionary is of type 'Models.Asset', but this dictionary requires a model item of type 'System.Collections.Generic.List`1Below is my Kendo grid and here is my Partial

@Html.Partial("_Address", Model.Address)

@(Html.Kendo().Grid(Model.Address)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Id).Hidden();
columns.Bound(p => p.Address).Width(300);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.Events(events =>
{
events.Save("onSave");
events.Edit("onEdit");

})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.ToolBar(toolBar =>
{
toolBar.Create().Text("Add Address");
})
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("onError"))
.Model(model => model.Id(p => p.Address))
.ServerOperation(false)
)
)
crazy05
Top achievements
Rank 1
 answered on 18 Mar 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?