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

[Solved] Posting read-only values on udpate

0 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
john
Top achievements
Rank 1
john asked on 06 Jun 2012, 05:51 AM
A column in a grid is called LAST_UPDATED_DATE -- this column is readonly and I need to to post this value back to the server when the update to the row/record is performed.  I have found that columns specified as readonly do not get post back and I need to post this back to the server.  I came up with the following code, but not sure it's the way to go.  Furthermore, when a user clicks add record, the following value appears in the column (this is default json format for date): "/Date(-62135575200000)/ "....not exactly what I'm looking for.

Any ideas on how to simply post the a read-only value back on an update?


 columns.Bound(col => col.LAST_UPDATED_DATE).Format("{0:g}").Title("Update Date").ReadOnly()
            .ClientTemplate("<#= $.telerik.formatString('{0:g}', LAST_UPDATED_DATE) #><input type='hidden' name='lastUpdateDate' value='<#= $.telerik.formatString('{0:s}', LAST_UPDATED_DATE) #>'>");           


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