Home › Forums › Guriddo jqGrid JS › Filter the editable value before submit to server
This topic contains 1 reply, has 2 voices, and was last updated by guriddo.support 2 months, 2 weeks ago.
I am wondering if there is any option to filter the value entered within an editable field, before to be sent to the server.
Eg, if submitting an empty string (for a text input control) the value to be converted to null before sending.
There is a such event(s)
Depending on the editing module used you can use
serializeCellData – the event is defined as grid option for cell editing module
serializeRowData – the event is passed as param in editRow, saveRow function for inline editing
serializeEditData – the event is passed in navigator edit/add options , editRowdata method for form editing module
To all events is passes the data parameter, which is object wioth the posted data. You can analyze the fields and should return the object Example:
Hope this helps. You can read the docs here
Just for your information if this is only the case we have a build in options to send nulls when the posted elements are empty string. The parameter is named : NullIfEmpty see the docs for it.
Guriddo Support Team
You must be logged in to reply to this topic.
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS