Telerik Forums
Kendo UI for jQuery Forum
2 answers
188 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
141 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
786 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
132 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
149 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
190 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.0K+ 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
4 answers
1.2K+ views
I recently created a new project with the latest Kendo code. The project has numerous grids and most of them use filter rows. I do all my grid filtering, sorting, paging, and grouping on the server side using the DataSourceRequest object that the grid passes through the grid's data source read action. I noticed that in the latest version of Kendo, there are four new filter operations: Is Null, Is Not Null, Is Empty, and Is Not Empty. Those seem like good options to have for filtering. The problem is that, in their current form, they're unusable for server side filtering. The filters in the DataSourceRequest object are not providing the critical Member property when using any of the new operations so I have no way of knowing which columns in my database the new filters should be applied to. Can you tell me if you are aware of this issue and, if so, when you will fix it? Also, is there a way to keep those operations (or any of the others for that matter) from showing up in the list of filter operators? Thanks.
Bryan
Top achievements
Rank 1
 answered on 01 Apr 2016
1 answer
5.7K+ views
How can I know whether kendo grid rendering finished or not?
I want to do something after the grid was rendered, but there isn't a 'rendered' event, Any suggestions?

BTW:
If I init a kendoGrid with the following data source:
$("#grid").kendoGrid({<br>  dataSource: [<br>    { name: "Jane Doe", age: 20 },<br>    { name: "John Doe", age: 30 }<br>  ]<br>});


How can I show commandA when age<25, and commandB when age>25?
Thanks.
Harlan
Top achievements
Rank 1
 answered on 01 Apr 2016
5 answers
1.2K+ views
I an posting this fully functional code to help others with the issue. The code below sets the column titles with a dynamic variable that is set based on FunctionalBusinessArea.

@model SPI.UI.View.Models.RecordingDetails
@{
    //Dynamically set the grid column labels based on functional business area.
    var colProgram = string.Empty;
    var colTeritoryName = string.Empty;
    var colParty = string.Empty;
    var colCatalog = string.Empty;


    if (ViewBag.FunctionalBusinessArea == "Song")
    {
        colProgram = @WorkRes.GridWCIColProgram;
        colTeritoryName = @WorkRes.GridWCIColTerritory;
        colParty = @WorkRes.GridWCIColParty;
        colCatalog = @WorkRes.GridWCIColCatalog;
    }
    else if (ViewBag.FunctionalBusinessArea == "Product")
    {
        colProgram = @ProductRes.GridWCIColProgram;
        colTeritoryName = @ProductRes.GridWCIColTeritory;
        colParty = @ProductRes.GridWCIColParty;
        colCatalog = @ProductRes.GridWCIColImprint;
    }
    else if (ViewBag.FunctionalBusinessArea == "Recording")
    {
        colProgram = @RecordingRes.GridWCIColProgram;
        colTeritoryName = @RecordingRes.GridWCIColTeritory;
        colParty = @RecordingRes.GridWCIColParty;
        colCatalog = @RecordingRes.GridWCIColRecordingLabel;
    }


<div>
    <div class="section-title">Who controls it?</div>
    <table id="tblDerivedCreationRights"></table>
</div>


    <script type="text/javascript">
        $(document).ready(function () {
            $("#tblDerivedCreationRights").kendoGrid({
                dataSource: {
                    type: "json",
                    transport: {
                        read: "/Song/SongDerivedCreationRights/@Model.Recording.Id.ToString()"
                    },
                    schema: {
                        model: {
                            fields: {
                                ProgramId: { type: "string" },
                                TerritoryName: { type: "string" },
                                PrimaryPartyName: { type: "string" },
                                PrimaryRightshareSetName: { type: "string" }
                            }
                        }
                    },
                    pageSize: 100,
                    serverPaging: false,
                    serverSorting: true
                },
                scrollable: true,
                sortable: { mode: "single", allowUnsort: false },
                pageable: false,
                columns: [
                    { field: "ProgramId", title: '@colProgram', width: 75 },
                    { field: "TerritoryName", title: '@colTeritoryName', width: 100 },
                    { field: "PrimaryPartyName", title: '@colParty', width: 100, template: '<a href="/Party/Details?id=#=PartyId#">#=PrimaryPartyName#</a>' },
                    { field: "PrimaryRightshareSetName", title: '@colCatalog', width: 200, template: '<a href="/RightshareSet/Details?id=#=RightshareSetId#">#=PrimaryRightshareSetName#</a>' }
                    //{ field: "", title: "", template: "" }
                ]
            });
        });


    </script>
 }
Yousung
Top achievements
Rank 1
 answered on 01 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
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
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
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?