Telerik Forums
Kendo UI for jQuery Forum
4 answers
242 views
In my treeview control i have a root directory and is there anyway to prevent a child node in the root from being drapped outside the root node.
Vincent
Top achievements
Rank 1
 answered on 04 Apr 2016
1 answer
127 views

Hi ,

i have written a small module with a kendo grid which i have to use in several projects/places/files:

 

guimodule.kundensuche = (function() {

var kundenDataSource = new kendo.data.DataSource ( {

type: "json",
pageSize: 20,
transport: {
read: {
url: "http://................/DataService/json/kunden/select_for_suchgrid.pvx?sessionid=" + rkkutils.getQueryParam("sessionid"),
type: "post",
dataType: "json"
}
},

});



$("#kundensuchgrid").kendoGrid({

dataSource: kundenDataSource,

height: 550,
sortable: true,
selectable: "row",
change: function(e) { console.log("Module"); this.trigger("kdnrSelected");},
pageable: {
refresh: true,
pageSizes: true,
buttonCount: 5
},
columns: [
{
field: "kdnr",
title: "KDNR",
width: 55

}, {

template: "#: name1 #<br>#: name2 #<br>#: name3 #",
title: "Name",
width: 240
}, {
field: "strasse",
title: "Strasse",
width: 240

}, {
field: "landkz",
title: "Land",
width: 50

}, {
field: "plz",
title: "PLZ",
width: 65
}, {
field: "ort",
title: "Ort",
width: 180
}

]



});

var kundensuchgrid = $("#kundensuchgrid").data("kendoGrid");



var createEingabeFilter = function createEingabeFilter() {
$("#kundensuchfilter").html("<input class='k-textbox' type='text' id='SearchKunden'/>")

};

}

$("#SearchKunden").on("keyup", function(e){


var q = this.value;

if (q == '') {
this.placeholder=speech.suchbegriff;
}
kundensuchgrid.dataSource.query({
page:1,
pageSize:20,
filter:{
logic:"or",
filters:[
{field:"kdnr", operator:"contains",value:q},
{field:"name1", operator:"contains",value:q},
{field:"name2", operator:"contains",value:q},
{field:"name3", operator:"contains",value:q},
{field:"strasse", operator:"contains",value:q},
{field:"plz", operator:"contains",value:q},
{field:"ort", operator:"contains",value:q},
{field:"matchcode", operator:"contains",value:q},
{field:"landkz", operator:"contains",value:q}

]
}
});


});

return {
createEingabeFilter: createEingabeFilter

}


}());

 

Now i can use this in an html file like this:

 

<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.2.624/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.2.624/styles/kendo.blueopal.min.css"/>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2015.2.624/styles/kendo.blueopal.mobile.min.css"/>

<script src="../../kendoui/js/jquery.min.js"></script>
<script src="../../kendoui/js/kendo.all.min.js"></script>
<script src="../../kendoui/js/cultures/kendo.culture.de-DE.min.js"></script>

<title>Aussendienst-Informationen</title>

</head>
<body>
<div id="kundensuchgrid" />


<script src="../JsGuiModule/js/rkkutils.js"></script>

<script src="../JsGuiModule/js/guimodule.js"></script>

<script src="../JsGuiModule/kundensuche/kundensuche.js"></script>
</body>

 

</html>

 

Now i want to fire a custom event with the name "kdnrChanged"  as soon as a new row is selected in the grid and i want to have an event listener for this

event in  the html file. How can i do this ?

 

Regards

Dirk

 

 

Dimiter Topalov
Telerik team
 answered on 04 Apr 2016
1 answer
220 views

I have a grid in batch edit mode. I have two issues re tabbing when navigating the grid cell:

1: If i have a read-only ID column (the first column), how can I avoid tabbing into the cell when tabbing though the grid? I set the column attributes tabindex property to a negative number AND I have a custom editor in the cell with a negative tabindex  value, which effectively makes it a read-only cell.However the table cell still gets tabbed into when navigating the row. I want to the column to be skipped completely when tabbing.

 

2:  When tabbing into a command column. Is it possible to immediately activate the first command button? Right now the user must hit the Enter key twice to trigger the command via the keyboard. Once to highlight the  first button and again to trigger the click event.

Konstantin Dikov
Telerik team
 answered on 04 Apr 2016
2 answers
190 views

When I do this in my javascript:

 

            var diagram = $("#template-diagram").getKendoDiagram();
            diagram.bringIntoView(diagram.shapes[0], { align: "center" });

This shows up in the browser's debugger (using Firefox):

Error: i is undefined
k<.bringIntoView@http://localhost:8000/lib/kendo-ui/js/kendo.all.min.js:104:8505

 

In Chrome it looks like this:

TypeError: Cannot read property 'clone' of undefined
    at R.extend.bringIntoView (kendo.all.js:157101)

Which is likely why I can't get bringIntoView to work for my diagram.  I should mention, I am using the diagram in a JqueryUI dialog window, but otherwise, its a fairly simple diagram.

 

 

 

Vessy
Telerik team
 answered on 04 Apr 2016
1 answer
148 views
Hi..

I'm using kendo charts,date pickers and grid using angular js in my project.to get the grid details instead of using jquery im assigning name to grid like below.

 View:

 <div class="kendo-grid-wrap" kendo-grid="produtionSchedule" k-options="produtionSchedule"></div>

Controller:

Using grid name accessing all the properties and methods of kendo grid

example

var dataSource = $scope.produtionSchedule.dataSource.data;

$scope.produtionSchedule.showColumn();

For grid im able to assign name accessing properties and methods,how can i do same thing for kendo charts and date pickers and ,if i try to assign name to chart or date picker control it self not loading.

Here is the code that i tried with kendo chart :

 <div ng-show="utilisation.utilisationList.length != 0" kendo-chart
         k-legend="{visible:true}"
         k-series-defaults="{ type: 'pie',labels: {visible: true,background: 'transparent',template:'#= category #:
         #= value#%',format:'{0:P}%'}}"
         k-tooltip="{visible: true,format:'{0}',template:'#= category #: #= dataItem.time# hr'}"
         k-series="[{field: 'value', categoryField: 'category',explodeField:'explode'}]"
         k-data-source="utilisation.utilisationEventDetails"></div>

is there any solution to solve this issue..?

Dimiter Topalov
Telerik team
 answered on 04 Apr 2016
2 answers
795 views

Hi,

I am getting this error when "Pageable: true" with Angularjs and Web Api" 

Here is the JavaScript Code:

vm.userAuditHistDataSource = new kendo.data.DataSource({
transport: {
read: {
type: "GET",
dataType: "json",
url: 'api/UserAccess/GetUserAuditHistory?id='+ vm.userId + '&dateStart=' + vm.dateStart +'&dateEnd=' + vm.dateEnd
}
},
pageSize: 40
});

 

vm.auditGridOptions = {
dataSource: vm.userAuditHistDataSource,
columns: [
{ field: "briefDescription", title: "Event", width: 150 },
{ field: "fullDescription", title: "Description" },
{ field: "eventType", title: "Event Type" },
{
field: "recordReceivedAt", title: "Recorded At", template: "#= kendo.toString(kendo.parseDate(recordReceivedAt, 'yyyy-MM-dd'), 'MM/dd/yyyy') #"
}
],
height: 600,
columnMenu: true,
scrollable: true,
sortable: true,
filterable: true,
pageable: true,
};

Here is the Web Api Code:

[HttpGet]
[ActionName("GetUserAuditHistory")]
public List<UserAuditHistoryEvent> GetUserAuditHistory(Guid id, DateTime dateStart, DateTime dateEnd)
{
using (var client = new UserAdministrationClient())
{
using (var scope = new OperationContextScope(client.InnerChannel))
{
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = new HttpRequestMessageProperty { Headers = { { "user-agent", string.Format("FACTSInfo;S={0}", SessionId) } } };
var events = client.ListUserAuditHistory(id, dateStart, dateEnd);
return events.ToList();
}
}
}

GLC
Top achievements
Rank 1
 answered on 04 Apr 2016
1 answer
134 views

Hi,

 

I try to make cascading dropdownlist work with angular.js and the value are retrieved from a web api C#.  I cannot find any example how to make this work do you have a sample you can provide ?

Thanks

Alexander Valchev
Telerik team
 answered on 04 Apr 2016
7 answers
153 views

Hello,

 

I am trying to create a way for users to toggle forward and backward between available (displayed) events in the scheduler using MVVM. These prev/next buttons sit outside of the widget and display information from each event in a separate panel. May you please advise the best way to do this?

 

Thanks.

Vladimir Iliev
Telerik team
 answered on 04 Apr 2016
1 answer
192 views

Hi Support,

After updating from v2015.3.1111 to v2016.1.226
the ComboBox directive is not working like the prevous version.
the problem i have is the combobox is set to a value with the ng-model settings. 
the Text value is displayed in the combobox but the value is not set in the ng-model it changes it to null
the DataSource is a array like :

[
{
Text: 'some text',
Value: 0
},
{
Text: 'some other value'
Value: 1
}
]

the directive is cofigured :

<select kendo-combo-box 
ng-model="legendItem.ScaleMin"
k-data-text-field="'Text'"
k-data-value-field="'Value'"
k-auto-bind="false"
k-data-source="legendItem.ZoomLevels">
</select>

Georgi Krustev
Telerik team
 answered on 04 Apr 2016
3 answers
1.1K+ views

Hi

 

How access the datasource.filter using angular..

i.e how convert the code below to work in angular.. 

$scope.soneChange = function () {
       var grid = $('#grid').data('kendoGrid');  // Pseudo code..
      var value = $scope.sone;

       if (value) {
           grid.data("kendoGrid").dataSource.filter({ field: "Sone", operator: "eq", value: value });
       } else {
           grid.data("kendoGrid").dataSource.filter({});
       }
   };

Kiril Nikolov
Telerik team
 answered on 04 Apr 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?