Telerik Forums
Kendo UI for jQuery Forum
4 answers
526 views
I am changing the url of a grid and then sending an object as a parameter. The grid is calling the new controller I want, but the view model is empty. What am I missing?

1.return mvvm.toJSON(self, function (data) {
2.                data.Criteria = self._grid.dataSource.data();
3.            });

New grid datasource:
01.var dataSource = new kendo.data.DataSource({
02.     page: ds.page(),
03.     pageSize: ds.pageSize(),
04.     sort: ds.sort(),
05.     type: "aspnetmvc-ajax",
06.     transport: {
07.          prefix:"",
08.          read:  {
09.          url: "/AdvancedSearch/GetResults",
10.          dataType: "json",
11.          data: { criteria: data },
12.          type: "POST",
13.          traditional: true,
14.          contentType: "application/json",
15.       }
16.   }
17.});

Replacing grid datasource:
1.self.bindings.controls.EquipmentListGrid.setDataSource(dataSource);
2.self.bindings.controls.EquipmentListGrid.rebind();

Controller:
1.[HttpPost]
2.public ActionResult GetResults([DataSourceRequest] DataSourceRequest request, AdvancedSearchViewModel criteria)
3.{
4.}

ViewModel:
01.[Serializable]
02.public class AdvancedSearchViewModel
03. {
04.        [DisplayName("Include Junk Pool")]
05.        public bool IncludeJunkPool { get; set; }
06.        public List<string> Areas { get; set; }
07.        public List<string> GeoMarkets { get; set; }
08.        public bool ApplyBasket { get; set; }
09.        public IList<int> Basket { get; set; }
10.        public bool Export { get { return true; } }
11. 
12.        public string Page { get; set; }
13.        public string Column { get; set; }
14.        public string DisplayName { get; set; }
15.        public string Operator { get; set; }
16.        public string Value { get; set; }
17.        public string DataType { get; set; }
18.        public string Table { get; set; }
19. 
20.        public IList<AdvancedSearchListItem> Criteria { get; set; }
21. 
22.        public CurrentPage CurrentPage { get; set; }
23.        public Sort Sort { get; set; }
24.}

1.return mvvm.toJSON(self, function (data) {
2.     data.Criteria = self._grid.dataSource.data();
3.});

1.return mvvm.toJSON(self, function (data) {
2.     data.Criteria = self._grid.dataSource.data();
3.});

Petur Subev
Telerik team
 answered on 06 Feb 2014
1 answer
483 views
Hope this is an easy one. How do I set the size of the map? Say I want the map to be  300x300 px.

thanks,

Brian
Iliana Dyankova
Telerik team
 answered on 06 Feb 2014
2 answers
53 views
On

http://demos.telerik.com/kendo-ui/web/scheduler/index.html

there are three owners.

If you deselect them all, you can see all events.

The expected outcome was that no events was visible.
100%
Top achievements
Rank 1
 answered on 06 Feb 2014
1 answer
101 views
How get a reference of my grid widget on angular ?

for example the normnal way is this : 

$("#GridID").data("kendoGrid").dataSource.fetch();

but I make a reference to my widget from an angular controller ?
Petur Subev
Telerik team
 answered on 06 Feb 2014
6 answers
161 views
If you look at scheduler1.png, you'll see what the scheduler looks like when I'm not scrolling (it's so pretty!). However, when I start scrolling on the top or the bottom of the control, the times are offset from the content, as shown in scheduler2.png. Below is my angular initialization code. Thanks!

BTW, we're using this inside the new AppStudio (previous Icenium) and *loving* it. Keep up the good work!


<div id="scheduler" kendo-scheduler k-options="schedulerOptions"></div>

​$scope.schedulerOptions = {
startTime: new Date(kendo.toString($scope.today, 'd') + " 8:00 AM"),
endTime: new Date(kendo.toString($scope.today, 'd') + " 6:00 PM"),
views: ["day"],
editable: false,
dateHeaderTemplate: "",
footer: false,
height: 747,
majorTimeHeaderTemplate: kendo.template("<div class='schedule-tick'>#=kendo.toString(date, 'h')#<span>#=kendo.toString(date, 'tt')#</span></div>"),
minorTickCount: 4,
eventTemplate: $("#schedule-event-template").html(),
dataSource: $scope.appointmentDataSource,
  navigate: function (e) {
$scope.today = e.date;
var todaysDate = new Date();
if ($scope.today.setHours(0, 0, 0, 0) === todaysDate.setHours(0, 0, 0, 0)) {
$scope.isToday = true;
} else {
$scope.isToday = false;
}
$scope.$digest();
}
};
Chris
Top achievements
Rank 1
 answered on 06 Feb 2014
1 answer
112 views
Hello,

how do i bind an array in my js code to a html ul element.

This is my element: 
<ul id="attendees"></ul>

this is my template:
<script type="text/x-kendo-tmpl" id="tml_attendees">
     <img src="${url}">
</script>

i dont want to use an kendoMobileListView


Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
1 answer
92 views
Forgive me if this has been answered or if it's something really elementary.  I'm not a very strong developer for mobile web...

When I view the KendoUI mobile demos using my iPhone (iOS 7.0.4), the browser's Navigation and Tab bars (top and bottom) don't retract, leaving a significant amount of vertical space unusable and detracting from the otherwise app-like appearance of the demo.

Other web pages, including those not optimized for mobile, don't have this problem.  The bars retract on only reappear on a swift swipe up on the page.

Is this behavior intentional - and is there any way to 'fix' or change it?

Thanks!
Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
2 answers
210 views
I have a grid that uses the same template for editing and creating a new user record.
Everything works fine when editing but for some reason when creating a new user the lanuageId is not being returned when posting the data back.

All of the other fields are binding fine but no matter what the value selected in the dropdownlist the value 0 is being returned.
 
@(Html.Kendo().DropDownListFor(m => m.LanguageId)
                  .DataTextField("Name") //Specifies which property of the Product to be used by the dropdownlist as a text.
                  .DataValueField("Id") //Specifies which property of the Product to be used by the dropdownlist as a value.
                  .HtmlAttributes(new { @class = "form-control" })
                  .DataSource(source => source.Read(read => read.Action("GetLanguageValues", "Account")))

The form works perfectly fine when editing.

What am I doing wrong?
Benjamin
Top achievements
Rank 1
 answered on 06 Feb 2014
3 answers
217 views
Since header and footer take a lot of mobile app screen, would it be possible to hide footer when user starts scrolling down and display it back on scrolling up?
Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
1 answer
100 views
How do I access datastore and/or global objects from within template?
Vladimir Iliev
Telerik team
 answered on 06 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?