This is a migrated thread and some comments may be shown as answers.

Field Template has Id set to zero when item is created

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 28 Jul 2013, 12:41 PM
Hi All,

I have got a strange one here.  If I have this template assigned to a field on grid it works fine for existing items, but if I create an item the #Id# is zero.  I have check to make sure the datasource is updated after the item is saved and the Id is set to the new value.

{ field: "Name", title: "Name", width: "300px", "template": "<div class=\"sv-navcolumn\" data-id=\"accountdetail/#:Id#\" onclick=\"accountLaunchDetails(this)\" ><span class=\"sv-navcolumnlink\" >#: Name #<img src=\"/Images/arrow-right.png\" alt=\"Show Pointer\"></span></div>"}, 

Here is the resulting HTML

<div class="sv-navcolumn" data-id="accountdetail/0" onclick="accountLaunchDetails(this)"><span class="sv-navcolumnlink">test <img src="/Images/arrow-right.png" alt="Show Pointer"></span></div>

So when is the template evaluated when an item is created?  

Any  suggesting?

Regards

Richard....



1 Answer, 1 is accepted

Sort by
0
Accepted
Richard
Top achievements
Rank 1
answered on 28 Jul 2013, 12:47 PM
Hi All,

Ignore that just found the answer in this reply  http://www.kendoui.com/forums/permalink/IrAzRBKlgkCABiaLWn2ibw

Regards

Richard...


Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or