when the user type in toolbar search box & search operation performs or search box was cleared, this will help a lot, new we have to use our own search toolbar implementation for components integration
$(this.searchBoxController).on("search", this.ResetSelection.bind(this));
Hello.
We have to implement a functionality, where the user can create multiple spreadsheet objects via drag and drop.
This part works perfectly, but we got a report regarding Data Validation using custom Formula.
If the user writes a correct formula, everything is fine, but when it is an invalid one (e.g. >3), we receive a ParseError exception. The message is this: "Parse Error (input >2)".
I tried to validate the formula in the Changing event, but there is no interface to directly call the validation without further implications.
My first try was to create a formula using defineName and if it does throw an exception I stop the process via the preventDefault function. In the case of a ParseError it worked, but it created other exceptions as we have a lot of code attached on nearly all of the events and the defineName function seems to create more events, which will eventually fail (for us at least).
My second try was to create a formula on a cell and as in the solution before, in case of exception, abort the process, otherwise allow it to go on. However this wasn't a good idea because it can corrupt the already existing data.
So my question would be, is there some way to validate a custom formula in the Data Validation and stop it from causing further problems? To catch the exception is quite difficult, because of the dynamic allocation of the spreadsheets, or maybe there is a certain point where this can be caught?
Thank you for your answers,
Norbert Kocsis
Hi
I want to have 2 dropdownlists but I want to hide the second list if nothing gets populated into it.
You would first choose from Dropdown A, if the selection of Dropdown A does not populate anything into Dropdown B then I want to hide Dropdown B, If something is populated into Dropdown B then I want to show it.
I thought DataBound Event would do this and be fired each time something switched in A but what I am noticing, that if I say make a choice in dropdown A which renders a result in Dropdown B then the databound event is triggered, then if I go and make another choice on dropdown A which renders no result in B the databound event is triggered.
However after that no databound event is triggered.
@(Html.Kendo().DropDownListFor(x => x.Country)
.OptionLabel("Select country...")
.DataValueField("Code")
.DataTextField("Name")
.Filter(FilterType.Contains)
.DataSource(ds => ds.Read(r => r.Action("GetCountries", "Countries")))
)
@(Html.Kendo().DropDownListFor(x => x.State)
.OptionLabel(
"Select State"
)
.DataValueField(
"Code"
)
.DataTextField(
"Name"
)
.Filter(FilterType.Contains)
.DataSource(ds => ds.Read(r => r.Action(
"GetStates"
,
"States"
).Data(
"getCountryCode"
)))
.CascadeFrom(
"Country"
)
.Enable(
false
)
.Events(e =>
{
e.DataBound(
"onStateDataBound"
);
})
)
function
onStateDataBound(e) {
if
(e.sender.dataSource.data().length <= 0) {
// hide } else {// show}
}
I'm not an expert - but most of the work that I have seen on developing REST Apis show the default if you want to get a list of resources from an api that you should make the endpoint something like /api/resources with a get call. Similarly if you want to create a resource, your endpoint would be something like /api/resource with a Post call and include the data to be created in the body of the request.
On numerous occasions, I have been caught up because a forgot that Telerik expects its endpoints to be decorated with an additional term resulting in endpoints such as /api/resources/all and /api/resource/create etc. Why does Telerik do this? Is there any configuration that you can set so that you can use what for me at least is the more standard REST Api endpoints?
Controller Method
public ActionResult EditSupplierTeamReps(DataSourceRequest incoming, ManageSuplierTeamRepViewModel supplierTeamRep)
{
return Json(result);
}
I have a situation where an administrative user creates an Excel file using her desktop copy of Excel and saves it to a location on our server. What I want to do is load that file from the server into a Spreadsheet control, have a user make changes in the Spreadsheet, and then click a button to save it back to a location on the server.
I see plenty of examples of importing files from the user's local system and exporting them to the user' local system. However, I don't see any examples of loading a file from the SERVER when the spreadsheet first loads. Similarly, I can't find an example of saving the spreadsheet contents as an Excel file on the SERVER.
Can somebody please provide an example of this?
Thank you!
Hi,
I have an issue related to Gantt view changes. If I'm in week view, and I scroll it to some period, for example from Jun 25 to Jun 30 (see day.png), and then I change view to month, period is changed, and it goes to December (see month.png). Is there any way to fix this period after view change?
Thanks in advance.
Hi,
I am trying to implement simpler version of tilelayout demo (small dashboard) in quite old angularjs application.
Following examples in demo I wanted to replace simple hardcoded value of conversion-rate (9%) with data from my service.
Html is correctly rendered but not updated when vm.myRisk changed..
Here are relevant pieces of code that I have:
Controller:
... controller declaration etc..
var vm = this;
vm.myRisk = 0;
getRiskData(); //Function calls server and retrieves simple int value and sets vm.myRisk to this value
var riskTemplateString = '<
h3
><
label
><
span
ng-bind
=
"vm.myRisk"
></
span
> % </
label
></
h3
> <
div
> ' + localeService.tr("risk") + '</
div
>';
var riskTemplate = kendo.template(riskTemplateString);
$("#tilelayout").kendoTileLayout({
containers: [{
colSpan: 1,
rowSpan: 1,
header: {
text: "my risk"
},
bodyTemplate: kendo.template(riskTemplate)
}],
columns: 6,
columnsWidth: 300,
rowsHeight: 235,
reorderable: true,
resizable: true,
resize: function (e) {
var rowSpan = e.container.css("grid-column-end");
var chart = e.container.find(".k-chart").data("kendoChart");
// hide chart labels when the space is limited
if (rowSpan === "span 1" && chart) {
chart.options.categoryAxis.labels.visible = false;
chart.redraw();
}
// show chart labels when the space is enough
if (rowSpan !== "span 1" && chart) {
chart.options.categoryAxis.labels.visible = true;
chart.redraw();
}
// for widgets that do not auto resize
kendo.resize(e.container, true);
}
});
my html is very simple and has only placeholder for the widget and controller declared using standard controller As syntax..
<
body
>
<
div
ng-controller
=
"myDashboardController as mdc"
class
=
"c-module"
>
<
div
class
=
"c-module-content"
>
<
div
id
=
"example"
>
<
div
id
=
"tilelayout"
></
div
>
<!-- container text templates -->
<!-- THIS IS CONTAINER I WAS REPLACING -->
<!-- <
script
id
=
"conversion-rate"
type
=
"text/x-kendo-template"
>
<
h3
>9%</
h3
>
<
div
>Visitor to Customer</
div
>
</
script
> -->
</
div
>
<
style
>
.k-card-header {
flex: 0 0 auto;
}
.k-card-body {
overflow: hidden;
}
</
style
>
</
div
>
</
div
>
</
body
>
Thanks