I have primary key of my row as hidden field in my jQGrid. It is called "UserId"
colNames: ['UserId', "Details" ...],
colModel: [{ name: 'UserId', index: 'UserId', editable: false, hidden: true },
{ name: 'Details', index: 'Details', editable: true, editactioniconscolumn: true },
...]
I get worked create and update cases but i have an issue with delete
Because when delete i am getting an Id
of the grid row back on controller and not UserId
,
I can keep all UserId's
in grid id, that is what i am currently done to make delete work, but i am wondering is there any way to get my hidden UserId
getting posted instead of grid row Id.
You can implement your requirements in many ways:
UserId
column is unique on the page and can be used to identify the row you can add key:true
property to the UserId
column definition in the colModel
.postdata
parameter and add additional information which will be send to the server. See here for an example.editData
which I described here.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With