Telerik Forums
Kendo UI for jQuery Forum
2 answers
146 views

There seems to be several examples about web api and the data binder, however none of them seem to work well if I have a custom service that is posting the options.data object.  The Sort/Filters don't bind and are null.  

Any help would be great or if there is a different way to easily post the DataSourceRequest via a service. 

Here is a boiled down example:

API Controller: 

 

public DataSourceResult PageList(HttpRequestMessage requestMessage)
        {
            DataSourceResult result;
            
            var request = requestMessage.Content.ReadAsAsync<DataSourceRequest>().Result;
// request.Sorts is null although the actual HTTP request was posted correctly.
             
            
                result = _someService.GetAllQ().ToDataSourceResult(request);
 
            return result;
        }

Kendo Datasource Transport:

transport: {
  read: function (options) {
    api.dosomething.pageList(options.data).then(function (data) {  //this is posted
      options.success(data);  
    });
}​

Sam
Top achievements
Rank 1
 answered on 06 Aug 2015
1 answer
83 views
sorting and filtering is not working with simple json data.
Konstantin Dikov
Telerik team
 answered on 06 Aug 2015
1 answer
323 views

Hi, when page open in landscape view, all the tabs are visible on screen and there is no need to show arrows, but when it switched to portrait view, some tabs became hidden but arrows won't appear. 

 Video. http://screencast.com/t/So8LdSrcW

 

How to compel widget to recalculate it?

Dimo
Telerik team
 answered on 06 Aug 2015
2 answers
384 views
Hi *,

I have to create a grid (the AngularJS version) in dependence of the requested data/entity.
For example, the "User" entity could have 3 columns ("username", "firstname", "lastname") while an "Articles" entity might consist of 5 columns ("ArticleNo", "Description", "Price", "Availability", "UserRating").
So I neither know the number of columns nor their titles. Besides that, the column titles have to be translated (server-side) according to the language of the logged-in user.

That's why I need to retrieve the column definitions from the server, e.g. in a separate JSON file. 

Example: column definitions and data for "User" entity:
grid_coldefs.json:
1.[<br>  {<br>    "field": "username",<br>    "title": "User Name",<br>    "width": "120px"<br>  },<br>  {<br>    "field": "firstname",<br>    "title": "First Name",<br>    "width": "120px"<br>  },<br>  {<br>    "field": "lastname",<br>    "title": "Last Name",<br>    "width": "120px"<br>  }<br>]


grid_data.json:
1.[<br>  {<br>    "id": 1001,<br>    "username": "UserName1",<br>    "firstname": "Fname1",<br>    "lastname": "Lname1"<br>  },<br>  {<br>    "id": 1002,<br>    "username": "UserName2",<br>    "firstname": "Fname2",<br>    "lastname": "Lname2"<br>  },<br>  {<br>    "id": 1003,<br>    "username": "UserName3",<br>    "firstname": "Fname3",<br>    "lastname": "Lname3"<br>  },<br>  {<br>    "id": 1004,<br>    "username": "UserName4",<br>    "firstname": "Fname4",<br>    "lastname": "Lname4"<br>  }<br>]



I tried different ways, but didn't get it to work...
(1):
1.myApp.controller(...) {<br>  $scope.mainGridOptions = {   <br>    dataSource: {<br>      type: "json",<br>      transport: {<br>        read: "rest/grid_data.json"<br>      },<br>      ...<br>    },<br>    columns: {<br>      type: "json",<br>      transport: {<br>        read: "rest/grid_coldefs.json"<br>      }<br>    },<br>    ...<br>  }  <br>}

==> DOESN'T WORK AT ALL

(2):
1.myApp.controller(...) {<br>  $scope.colHeaders = {};<br>  $http.get("rest/grid_coldefs.json").success(function(data) {<br>    $scope.colHeaders = data; <br>  });<br>  <br>  $scope.mainGridOptions = {   <br>    dataSource: {<br>      type: "json",<br>      transport: {<br>        read: "rest/grid_data.json"<br>      }<br>    },<br>    columns: $scope.colHeaders<br>  }<br>}

==> DOESN'T WORK ($scope.colHeaders is set, but probably too late because $http.get is async... The grid is rendered but fieldnames (e.g. "username") are used for columns headers)

So I tried putting the whole stuff into the "SUCCESS" section:
(3):
1.myApp.controller(...) {<br>  $scope.colHeaders = {};<br>  $http.get("rest/grid_coldefs.json").success(function(data) {<br>    $scope.colHeaders = data; <br>    <br>    $scope.mainGridOptions = {   <br>      dataSource: {<br>        type: "json",<br>        transport: {<br>          read: "rest/grid_data.json"<br>        }<br>      },<br>      columns: $scope.colHeaders<br>    }<br>  });<br>}

==> DOESN'T WORK (only a totally empty grid object (no column headers, no data) is renderd)


Any help is appreciated.
Thanks in advance!
Zaphod
Top achievements
Rank 1
 answered on 06 Aug 2015
1 answer
113 views

Hey guys,

i am trying to set the url of a window, but everytime the url is shown as text instead if the content from url. Any hints for me? 

e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest(\"tr\"));
var wnd = $("#window").data("kendoWindow");
wnd.content("./window.php?id=" + dataItem.ID);
wnd.open().center().toFront();

Window is created by php...

$window = new \Kendo\UI\Window('window');
$window->title('Object Details')
     ->visible(false)
     ->modal(true)
     ->content(array("url" => "./window.php"))
     ->resizable(true)
     ->width(300)
     ->height(300);
echo $window->render();

 

Regards

Chris    

Dimo
Telerik team
 answered on 06 Aug 2015
4 answers
287 views
I was wondering if there is was to create a custom function for when the title of a task of a task is clicked in the left side of the chart (tree view) if the chart's "editable" characteristic is set to false.  Essentially I'd like to link to an external page when a user double clicks on the title of a task.  A Dojo snippet would be greatly appreciated.
Matthew
Top achievements
Rank 1
 answered on 06 Aug 2015
1 answer
60 views

Testing our app using XCode 7 simulator, our App's UI is all different - the fonts are much smaller, we see all the scrollview pages on a single screen - displayed next to each other horizontally. Everything works well with IOS8.X and earlier.

The versions we use are:

KendoUI - Q12015 SP2 (Apr 29)

PhoneGap - Cordova ios platform 3.8.0

 

Is this something we should be worried about? Is anyone else seeing these issues as well? Would upgrading to KendoUI Q2 2015 solve these issues?

 

Petyo
Telerik team
 answered on 06 Aug 2015
1 answer
151 views

Hi, I unable to get trigger 'drop' event between two treeview controls. I am trying drag a node from treeview1(treeview control) to treeview2(treeview control). I could probably use databound to see the changes and somehow put additional attributes during dragstart to indicate node. Is there any easy way?

 

Thanks
Krishna

Alexander Popov
Telerik team
 answered on 06 Aug 2015
3 answers
355 views

Hi,

I'm using Aurelia (aurelia.io) which relies on jspm/systemjs to load libraries. I know there is a japm/bower package for github:kendo-labs/bower-kendo-ui but how should I set things up in order to use kendo-ui professional as a jspm package? Shoud I create my own private kendo-ui github repository and use it a jspm package?

Thanks

Sylvain

Petyo
Telerik team
 answered on 06 Aug 2015
1 answer
191 views

Hello, I have my tabstrip configured to pull dynamic content for each tab using the contentURLs property like so:

 

<!-- TABSTRIP -->
<div id="tabstrip-revenue-by-product">
    <ul>
        <li class="k-state-active">
            Revenue by HCPC
        </li>
 
        <li>
            Versus Prior Month
        </li>
 
        <li>
            YTD
        </li>
 
        <li>
            Normalized Revenue
        </li>
    </ul>
 
    <!-- Revenue by HCPC -->
    <div class="revenue-by-hcpc">
         
    </div>
 
    <!-- Versus Prior Month -->
    <div class="versus-prior-month">
         
    </div>
 
    <!-- YTD -->
    <div class="ytd">
         
    </div>
 
    <!-- Normalized Revenue -->
    <div class="normalized-revenue">
         
    </div>
 
</div> <!-- End Tabstrip -->
 
<script>
$(document).ready(function () {
    $("#tabstrip-revenue-by-product").kendoTabStrip({
            animation: {
                open: {
                    effects: "fadeIn"
                }
            },
            contentUrls: [
                "Views/Reports/Widgets/revenue-by-hcpc.aspx",
                "Views/Reports/Widgets/versus-prior-month.aspx",
                "Views/Reports/Widgets/ytd.aspx",
                "Views/Reports/Widgets/normalized-revenue.aspx"
            ]
        });
});
</script>

But the contentURLs never fire. I use Firebug to track any AJAX calls, but none are being made. It's not like I have a bad path to the file, because I don't even see the request. 

Konstantin Dikov
Telerik team
 answered on 06 Aug 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?