Reputation: 41
I am currently trying to update values in Jqgrid using .jqGrid('setCell', i, 'columnName', Value).
If the value of Value is not '', the value is reflected in the table when .jqGrid('setCell', i, 'columnName', Value) is executed, but if the value of Value is '', it is not updated and displayed as the previous value.
Furthermore, this happens only in IE, but in chrome, the value is normally updated. So, does anyone know how to make the table display a blank field when the value is ''?
Thank you in advance.
Upvotes: 0
Views: 45
Reputation: 3292
The text below is from the documentation of Guriddo jqGrid.
setCell(string rowid, string colname, [string data], [mixed class] ,[object properties],[boolean forceup])
Change the content of particular cell and can set class or style properties.
parameters
string rowid - the is of the grid row
string colname - column name as defined in colModel or index staring from 0
string data - the new data that will be set. If empty string the content will not be changed
mixed class - if the class is a string we set it as class. If the class is object we set the properties with the css jQuery method
object properties - attribute properties to be set
boolean forceup - if the parameter is set to true we perform update of the cell instead that the data parameter is empty.
return
jqGrid object
Using the last parameter to true will help you to achive what you want - this is in case you use Guriddo jqGrid.
Upvotes: 1