Hi
I'm creating a custom async function that for some reason bugs out the spreadsheet.
The first few calls work fine, but after a while, the args passed are not the values of the cells, but the code of the cells. I had to use the raw function to test it out. This is what I mean, on the spreadsheet it goes like =getdata(B1,"name",C4,"a") for instance. Which should call the function with values from cell B1 and C4, correct?
Well, it does, for a few calls. Then suddenly it's not the value of B1 what is passed into the call, but "B1" itself.
I wrote this simple test that will print out the error.
You can see it running at:
http://valuation.joaquingrech.com/test
kendo.spreadsheet.defineFunction("getdata", function (callback, args) {
try {
var name = args[1];
var date = args[2];
var ar = json[name];
var mindate = 2012;
if (ar.constructor === Array) {
var index = Number(date) - mindate;
callback(ar[index]);
}
callback(ar);
} catch (e) {
if (!displayed)
alert('error args:'+args+' error:' + e);
displayed = true;
}
});
so how do I fix it?
I am using Kendo dropdownlist with server side filtering using jquery in mvc,i'm facing one issue like when i type any special character like ? & ‘ - ..etc,the filter is not working
I have tried to debug the code in backend, in Request.Params.Get("filter[filters][0][value]") the value is getting null
is there any setting to filter special characters in search filter? please let me know
below is the code that i have used.
$('#kendodrop').kendoMultiSelect({
placeholder: "Select",
dataTextField: "Text",
dataValueField: "Id",
filter: "contains",
filtering: function (e) {
var filter = e.filter;
if (filter != undefined && !filter.value) {
//prevent filtering if the filter does not value
e.preventDefault();
}
},
noDataTemplate: 'No Data!',
height: 290,
virtual: {
itemHeight: 26,
valueMapper: function (options) {
$.ajax({
url: '../controller/valueMapper',
type: "GET",
dataType: "jsonp",
success: function (data) {
options.success(data);
}
})
}
},
dataSource: {
transport: {
read: {
type: "POST",
url: "../controller/getdata",
dataType: "json",
},
parameterMap: function (options) {
return options;
}
},
schema: {
data: 'data',
total: 'total',
fields: [
{ field: 'Id', type: 'number' },
{ field: 'Text', type: 'string' }
]
},
pageSize: 44,
serverPaging: true,
serverFiltering: true
},
dataBound: function (e) {
//prevent the click event for disabled ones
$(".optiondisable").parent().click(false);
$(".optiondisable").parent().css("background-color", "#E4E6E9");
//var listContainer = e.sender.list.closest(".k-list-container");
//listContainer.width(listContainer.width() + kendo.support.scrollbar());
e.sender.list.find("li").addClass("k_advautowrap");
deffered.resolve();
}
});
Hi
By default the spreadsheet has a height that it's way too small for my excel sheet. Half of my webpage is just blank space with a tiny box with the spreadsheet.
How can I make it taller? I tried div style height:100% but that didn't work. Also hardcoding it on px may not be a good idea since everyone has a different screen.
Ideally it should be the height of the latest visible excel row.
so:
1) Can I make it so it goes full screen (all area of the web page)?
2) Even better, can I make it so that it goes to the height of certain row position? Like if I want to make it all visible without scrolling the component up to row 100 for instance.
Is there a slimmed down paging available for sites that have large amounts of content that are not within a Kendo grid control? I would like to use the same paging control that I use in the grids at the bottom of long pages. I want to use one at the end of my blog site (http://gregoryalexander.com/blogCfc/client/?reinit=1&theme=silver)
Please advise, I spent around 30 minutes and could not find anything specific on the web.
On a grid is it possible to display an error message from the viewmodel datasource in the no records template?
I know you can display a custom string like this.
data-no-records="{ template: 'No Records Today!'}"
In playing with a Kendo Grid I found that it's possible to enter Javascript code into the json dataSource and get it to execute.
This is the snippet I worked with as a proof of concept:
https://dojo.telerik.com/@andyrblank/uSAmapAV
I found this while entering data into a MVC grid for testing.
Hi,
As my title says when i export my Grid to PDF, the export is stopping short, please look at the attachment, i dont know how to explain whats happening.
My config is as follows:
<script id=
"template-pdf-export"
type=
"text/x-kendo-template"
data-th-inline=
"text"
>
<div class=
"pdf-export"
>
<div class=
"header"
>
<div style=
"float: right"
>Page
#: pageNum # of #: totalPages #</div>
</div>
<div class=
"footer"
>
Page
#: pageNum # of #: totalPages #
</div>
</div>
</script>
And my PDF config in my grid is here:
pdf: {
paperSize: "A4", // Required so that template and scale are used
landscape: true,
margin: { top: "2cm", right: "1cm", bottom: "1cm", left: "1cm" },
template: $("#template-pdf-export").html(),
scale: 0.75 // Scale down the text size when printing to PDF
},
I have no clue, its like kendo lost interest in drawing the rest of the grid? :D
Please advise.
Thanks,
Grant
I am experiencing super slow performance on the Grid when trying to add a new record. This happens when the grid has more than 20 comments.Each row of the grid has an instance of the custon text angular component (https://github.com/textAngular/textAngular). When adding, a new record is succesfully added to the datasource (javascript objects) but the Grid takes about 30s to refresh(to show in UI).
{
sortable: false,
pageable: false,
selectable: false,
scrollable: true,
height: 400,
dataSource: createDataSource(),
columns: [
{
field: 'Field1',
title: 'Field',
width: '80px',
template: "<input type= 'checkbox disabled='disabled' data-bind='checked: Cleared' #= Cleared ? checked='checked' : '' #/>"
},
{
field: 'Field2',
title: 'Field2',
width: '80px',
template: "<select class='k-dropdown minWidth40' id='dropdownlist'><option value='Yes'>Yes</option><option value='No'>No</option</select>";
}
},
{
field: 'Field3',
title: 'Field3',
width: '45%',
template: function (dataItem) {
return ' <text-angular name="{{dataitem.id}}"
ta-toolbar="[['ul', 'ol', 'bold', 'italics', 'underline']]"
ta-toolbar-class="btn-toolbar toolbar-ext"
ta-toolbar-group-class="btn-group"
ta-toolbar-button-class="btn btn-default"
ta-toolbar-active-button-class="active"
placeholder="Enter 2000 characters or less"
ta-disabled="false"
ta-text-editor-class="form content"
ta-maxlength="2000"></text-angular>
'
}
},
{
field: 'IsHighlighted',
width: '4%',
headerTemplate: "<div uib-tooltip='Highlight' tooltip-animation='false' tooltip-append-to-body='true'>" +
"<p class='noMargin noPadding'><span class='highlight-icon'><span></p>" +
"<p class='noMargin noPadding'><input type='checkbox' name='allToggleHighlight' class='comment-row-toggle-field'/></p>" +
"</div>",
template: function (dataItem) {
return "<div>" +
"<input type='checkbox' name='highlightToggle' " +
"</div>";
}
},
{
field: 'Period',
title: 'Period',
width: '25%',
hidden: true
}
]
Any sugesstions on improving the performance?
Thanks!
GN