ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Not able to pass date to Grid Column ClientFormatFunc
Title:
B
I
{code}
?
I am trying to pass datestring in clientformat function as new Column { ClientFormatFunc = "ConvertDateToLocal(.CreatedOn)", Header = "Created On" } but the function is not recognizing the date, how to achieve this ?
Save Changes
Cancel
SalesARM
asked at 22 Apr 2019
Answers
B
I
{code}
?
to `ClientFormatFunc` you must pass the name of a function ( or a function call that returns another function) and that function will be executed with the row model as the first parameter, so you must set: ClientFormatFunc = "ConvertDateToLocal" and the js function: function ConvertDateToLocal(model) { var date1 = model.CreatedOn; ... return str; }
Save Changes
Cancel
Omu
answered at 22 Apr 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK