I'm using a column template to display my StatusTypes array. It works fine, but when I use the "create" toolbar to add a row, the column template isn't displayed. Once I hit "save", then it shows, but I would like it to appear right when the user clicks "create".
$(
"#gridEmailAddress"
).kendoGrid({
dataSource: mydatasource,
scrollable:
true
,
sortable:
true
,
pageable:
true
,
editable:
true
,
resizeable:
true
,
toolbar: [
"create"
,
"save"
,
"cancel"
],
columns: [
{ field:
"Address"
, width: 190, title:
"Email Address"
},
{ field:
"Name"
, width: 190, title:
"Name"
},
{ field:
"StatusTypes"
, template: columnTemplate, title:
"Status Types:"
},
{ command:
"destroy"
, title:
" "
, width: 120 }
]
});
8 Answers, 1 is accepted
0
Hi Brandon,
Regards,
Rosen
the Telerik team
I'm afraid that I'm unable to recreate such behavior locally. Please take a look at the following example, maybe I'm missing something obvious.
Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Brandon
Top achievements
Rank 1
answered on 16 Dec 2011, 03:52 PM
Rosen,
I think I figured out the issue, thanks!
I think I figured out the issue, thanks!
0

Brandon
Top achievements
Rank 1
answered on 16 Dec 2011, 04:18 PM
Thanks again!
0

Ivan
Top achievements
Rank 1
answered on 17 Dec 2011, 10:56 AM
Hello,
I think that I have similar issue and it is actually very reproducible.
1. Go here http://demos.kendoui.com/web/grid/editing.html
2. Delete all the entries from the table, sorry it will take a little while.
3. Then click on Add New Record, nothing will happen.
In console you'll see:
In the application that I develop I see a little different stack trace (POSITION is the column name):
Uncaught ReferenceError: POSITION is not defined
anonymous:2
f.e.extend.proxy.gjquery.min.js:2
Grid.Widget.extend._rowsHtmlkendo.grid.js:1859
Grid.Widget.extend.refreshkendo.grid.js:2018
f.e.extend.proxy.gjquery.min.js:2
Observable.Class.extend.triggerkendo.core.js:123
DataSource.Observable.extend._processkendo.data.js:1293
DataSource.Observable.extend.successkendo.data.js:1250
f.e.extend.proxy.gjquery.min.js:2
RemoteTransport.Class.extend.read.options.successkendo.data.js:795
f.Callbacks.njquery.min.js:2
f.Callbacks.o.fireWithjquery.min.js:2
wjquery.min.js:4
f.support.ajax.f.ajaxTransport.send.d
Thanks!
I think that I have similar issue and it is actually very reproducible.
1. Go here http://demos.kendoui.com/web/grid/editing.html
2. Delete all the entries from the table, sorry it will take a little while.
3. Then click on Add New Record, nothing will happen.
In console you'll see:
- Uncaught TypeError: Cannot read property 'ProductID' of undefined
-
(anonymous function)
-
s.define.ikendo.all.min.js:11
-
n.extend.indexOfkendo.all.min.js:11
-
o.extend.indexOfkendo.all.min.js:11
-
h.extend.addRowkendo.all.min.js:11
-
h.extend._toolbarkendo.all.min.js:11
-
f.event.dispatchjquery-1.7.1.min.js:3
-
f.event.add.h.handle.i
-
In the application that I develop I see a little different stack trace (POSITION is the column name):
Uncaught ReferenceError: POSITION is not defined
anonymous:2
f.e.extend.proxy.gjquery.min.js:2
Grid.Widget.extend._rowsHtmlkendo.grid.js:1859
Grid.Widget.extend.refreshkendo.grid.js:2018
f.e.extend.proxy.gjquery.min.js:2
Observable.Class.extend.triggerkendo.core.js:123
DataSource.Observable.extend._processkendo.data.js:1293
DataSource.Observable.extend.successkendo.data.js:1250
f.e.extend.proxy.gjquery.min.js:2
RemoteTransport.Class.extend.read.options.successkendo.data.js:795
f.Callbacks.njquery.min.js:2
f.Callbacks.o.fireWithjquery.min.js:2
wjquery.min.js:4
f.support.ajax.f.ajaxTransport.send.d
Thanks!
0

James Lamar
Top achievements
Rank 1
answered on 18 Dec 2011, 04:40 PM
Second Ivan. Is this resolved in another thread?
0
Hi Ivan,
Rosen
the Telerik team
We are aware of this issue. Please refer to this forum post, where an internal build which should address this issue can be found.
All the best,Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Ivan
Top achievements
Rank 1
answered on 19 Dec 2011, 11:59 AM
Hello Rosen,
I've just tried the build that you linked to, and did solve the issue. Thank you!
Regards,
Ivan.
I've just tried the build that you linked to, and did solve the issue. Thank you!
Regards,
Ivan.
0

Elan
Top achievements
Rank 1
answered on 10 Mar 2012, 09:12 PM
In Rosen's example, UnitsInStock is a number.
What if the model looked like this:
I get an error when I try to build a template like this:
Is there a better way to do this?
What if the model looked like this:
var
Product = { Name:
'Milk'
, Costs: {Actual: 1, Retail: 3}};
I get an error when I try to build a template like this:
template:
"<b>#=Product.Costs.Actual#</b>"
Is there a better way to do this?