I'm wrapping Kendo controls for an application I'm writing in Aurelia.
I've written wrapper for Kendo Grid which works fine - I've used the "template" property in the grid options which accepts a callback. In this callback I dynamically compile the row template in the context of the row data which allows me to use Aurelia's markup instead of Kendo templates
Example:
<kendo-grid read.call="getTimesheets($event)" sortable.bind="true"> <kendo-grid-col field="TranDate" heading="Date"> <kendo-template>${ $item.TranDate | dateFormat }</kendo-template> </kendo-grid-col></kendo-grid>I'm trying to do the same with Calendar. I'd like to be able to provide a function which the calendar control will call when it's rendering the tiles on the Month view.
Currently the `month` property on Calendar options only seems to accept a JS object which allows a "content" string/kendo template.
Failing there being a callback, is there some documentation around kendo.template that I can use to write an Aurelia wrapper? I'm trying to dig around in the github repo to find where the kendo.template magic happens - any pointers or advice you could give me would be awesome!
Thanks in advance
hi,
is it possible to change the fontcolor-picker in the kendo ui editor (js)? I would like to use the flatcolorpicker instead of the standard with the websafe pallete.
Imagine that we have table with some data ( attached file: img1.png )
Using this data I created pivotDataSource for my Kendo pivotGrid like this:demo
As we can see our data looks like:
var someData = [ { Question1:'Q1Answr1', Question2:'Q2Answr1', Question3:'Q3Answr1', Question4: 1 }, { Question1:'Q1Answr2', Question2:'Q2Answer2', Question3:'Q3Answer2', Question4: 1 }, { Question1:'Q1Answr3', Question2:'Q2Answer3', Question3:'Q3Answer3', Question4: 1 }, ];For each question property we use only one answer, and our model looks like:
model: { fields: { Question1: { type: "string" }, Question2: { type: "string" }, Question3: { type: "string" }, Question4: {type: "number"} } }, ...But if I want to use table with data wich will look like: ( attached file: img2.png )
I must separate this data in this way: (find all possible combinations for answers): ( attached file: img3.png )
And only after that I can create someData js obj as we saw above.
var someData = [ { Question1:'Q1Answr1.1', Question2:'Q2Answr1.1', Question4: 1 },
for our pivotGrid.
The problem is, that we can have many questions ( 100+ questions) and for each question we can have ( 1-5+ answers) , so if I'll have in my row 5 answers for each question I must create (5*100)! unique combinations of answers, and after that i can create data for my pivotGrid where each data item will have one answer for one question.
Why I must do that ?
According to documentation Kendo dose not allow us to use Array type in model, so we cant write like this:
fields: { Question1: { type: "Array" },
So my questions are: 1) Does kendo have mechanism which allow me use array in my model. For example i will give it data wich will looks like:
var someData = [ { Question1:['Q1Answr1.1','Q1Answr1.2'], Question2:['Q2Answr1.1','Q1Answr2.2','Q2Answr2.3'], Question4: 1 },and it will build me pivot grid like this: ( attached file: img4.png )
but not like this ( attached file: img5.png )
2.Maybe you can advise me another solution to solve this problem with data separation. For example can we create a pivot grid configurator UI where we can choose only two items (two questions) (one for column , one for row), and after that , we will calculate all possible combinations of theirs answers , and after that we can use this data for our pivot grid.In other words: can we initialize our kendo pivot grid and kendo pivot grid configurator using one dataSource after that detect wich data was dropped in columns and rows after that make some calculations and prepare another dataSource ( using this dropped data) and replace old dataSource using new dataSource .Maybe you can advise me another solution to solve this problem with data separation.Thank you.
Hi
Is it possible to use images as the chart axis labels?
is there an out of the box way of doing this?
Hi,
In our mobile app (limited screen to work with, naturally) - We would love to have a chart that displays 2 bars per "record" - that are centered in the middle of the chart. The obvious application is an income/expense chart, where the middle line is the "0" value and to the right we show the income in green, with the expense to the left in red.
We are not sure if there is a way to do it with the current stacked bar chart type (or any of the others offered in KendoUI) - and would love to see if there is something we did not see or if this is something that might be added to a future release.
We attached a very "artistic" drawing showing the idea.
Thanks for any pointers,
Ron.
I'm using a Kendo grid, razor style, in an MVC application, binding to an ajax data source.
Products in the grid can be one of two types, and I want to apply different styles (background color, bold text, indent) to the different types of rows. I've seen examples using the ClientRowTemplate property, but I don't want to set the entire template for all the cells, as many columns already have their own templates. Isn't there a mechanism to just set a css class on a row based on data from the item it's bound to?
Thanks in advance.