multiselect jqgrid: id column formatter is integer but selarrrow returns array of strings

StackOverflow https://stackoverflow.com/questions/14458441

  •  17-01-2022
  •  | 
  •  

سؤال

I have my column model as -

colModel: [{name:'id',index:'id', width:200, formatter:'integer', hidden:true},

I see that the json data from the server is returned with the value of the id field as an integer, but $('#list').getGridParam('selarrrow') gives me an array of strings. Why? Is there anyway I can get it as an array of integers?

Thanks,

هل كانت مفيدة؟

المحلول

The formatter: "integer" means just inserting thousand separators (, or . from the language file which you use).

The id attribute of any HTML elements (inclusive <tr> which represent the row of the grid) contains no other data types as string. jqGrid interpret id always as strings too.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top