how can we map the sorting,paging and Filtering array to web API .
kendo datasource is as below :
var data = new kendo.data.DataSource({
type: "json",
transport: {
read: function (e) {
$http({
method: 'POST',
url: $scope.kendoGridConfig.URL,
dataType: "json",
headers: { 'Content-Type': "application/json" },
data: e.data
}).
success(function (data, status, headers, config) {
e.success(data)
}).
error(function (data, status, headers, config) {
console.log(status);
});
},
Web API POST method
public HttpResponseMessage AllCountries([FromBody]KendoGridOptions KendoGridOptions)
{
var res = _countryMasterService.GetListAllKendo(KendoGridOptions);
return new HttpResponseMessage()
{
Content = new ObjectContent<KendoGridResults<CountryMasterView>>(res, new System.Net.Http.Formatting.JsonMediaTypeFormatter())
};
}
public class KendoGridOptions
{
//public KendoGridOptions()
//{
// this.sort = new List<GridSort>();
//}
public int Take { get; set; }
public int Skip { get; set; }
public int page { get; set; }
List<GridSort> sort { get; set; }
public int pageSize { get; set; }
}
public class GridFilter
{
public string Operator { get; set; }
public string Field { get; set; }
public string Value { get; set; }
}
public class GridFilters
{
public List<GridFilter> Filters { get; set; }
public string Logic { get; set; }
}
public class GridSort
{
public string field { get; set; }
public string dir { get; set; }
}
Trying to use keyboard navigation to select items in the AutoComplete suggestion list.
Fairly certain this used to work.
Selection does indeed work, but style no longer shows up to highlight keyboard selected item.
Check out demo. Type a letter 's'. Try to use keys to navigate up and down the list. Notice how no style appears.
Tried in both FireFox and Chrome (latest versions).
Can also see this on the Kendo AutoComplete demo page (just make sure to switch to Material Black style first!)
http://demos.telerik.com/kendo-ui/autocomplete/keyboard-navigation​
HI Team,
I am using Kendo Grid. We have two grid (Parent + Child) trying to added tooltip to parent but the tooltip is appearing in child as well.
For Example.
If I have Parent Grid details with ID, Name, Languages Known
And Child Grid with Location, Department, Salary
I tried to add tooltip to Languages Known column to show the languages they are selected. Which is working as expected by using kendo tooltip with filter as td:nth-child(3). But the problem is same tooltip value got displayed in Salary column in the Child Grid also.
Kindly provide solution for this ASAP.
Thanks in advance.
Swarna
@(Html.Kendo().Upload()
.Name("FilesToUpload")
)$(document).ready(function() {
$("#FilesToUpload").closest(".k-upload").find("span").text("Select unit bulk upload file");
});I'm having trouble adding shapes to my map.
Here's my shape layer definition:
{ type: "shape", style: { stroke: { color: "blue", width: 4, dashType: "solid", opacity: 0.5 } }, dataSource: shapes }And this is how I'm adding things to it:
shapes.add({ "id": "FRA", "type": "Feature", "geometry": { "type": "MultiLineString", "coordinates": [myList] } });When I hardcode the populating of myList using numbers I found in another thread on shapes it works:
var myList = [];var pos = myList.length;myList[pos] = [];myList[pos][0] = -9.10531212;//I put these in here to make sure the problem wasn't that my coordinates were too precise.myList[pos][1] = 43.91251212;pos = myList.length;myList[pos] = [];myList[pos][0] = 3;myList[pos][1] = 43;pos = myList.length;myList[pos] = [];myList[pos][0] = 2;myList[pos][1] = 36;pos = myList.length;myList[pos] = [];myList[pos][0] = -9;myList[pos][1] = 37;But when I try to use the numbers from my data it doesn't work:
var pos = myList.length; myList[pos] = []; myList[pos][0] = 42.3055286; myList[pos][1] = -87.89389; pos = myList.length; myList[pos] = []; myList[pos][0] = 42.3055415; myList[pos][1] = -87.8938938; pos = myList.length; myList[pos] = []; myList[pos][0] = 42.3055766; myList[pos][1] = -87.8938775; pos = myList.length; myList[pos] = []; myList[pos][0] = 42.3055958; myList[pos][1] = -87.8938808;It looks like it should work to me, but it's not. It never draws the line when I use my own data.
Any ideas?
I am using a WCF Web Service to populate my kendo grid.
I currently am returning a List of item objects ( List<items> ). Now I need to enable server side paging and am at a loss as to how to go about this. I know I have to return total, but how do I add the total to what I'm returning?
Also what arguments do I need to add to my method in order to receive the skip, take, page, pageSize, etc from the grid?
I have a JSON string that I'm trying to convert to a datasource then bind to one of the controls. The string looks like this:
var TestData = [ {"Category": "1", "Attributes": [{"Attribute": "A", "Attribute": "B", "Attribute": "C" }] }]
then the datasource declaration is like this:
var thisData = new kendo.data.DataSource({
data: $.parseJSON(TestData),
schema: {
model: {
fields: {
Category: { type: 'string' },
Attributes: {
Attribute: { type: 'string' }
},
}
}
}
})​
When I bind to a listview and try to loop through the values in a template, it always tells me the length of the Attributes list is 1 and displays the last value ("C"). Is there something wrong in the declaration?