jQuery UI Widgets › Forums › Grid › Grid Column to be hide but accessible via form
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 12 years, 8 months ago.
-
Author
-
Hello,
i have a column with a column with chechbox, a column with hidden input for the checkbox selected to pass via form. I cannot pass the checkbox directly an indeed you suggested me to create another column with input checkbox, but if i hide the column the form is not getting anymore the hided values.
How can make invisible the column passing the data?
Thanks
Hello GabrieleMartino,
Please provide us with a sample code, which we may test locally.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/This is the hidden column, whereas data checked is the value of the not hidden column
{ text: 'Hidden', editable: false, datafield: 'hidden', width: 0, hidden:true, cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) { //value contiente il valorehidden dell'i-esima riga var data = jQuery('#grid').jqxGrid('getrowdata', row); html='<div style="overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; text-align: ' + columnproperties.cellsalign +'; margin:4px 2px 0px 4px;">' + value +'</div>'; //aggiungo due campi hidden: id e checked per sapere, in POST //se l'i-esimo id è stato selezionato o meno //row è il bound index della riga html+='<input type="hidden" name="data[Sound]['+row+'][id]" value="'+data.id+'" >'; html+='<input id="data[Categories][id]['+row+']'+row+'Checked" name="data[Categories][id]['+row+']" value="'+(data.checked?1:0)+'" >';//name="data[Person]['+row+'][checked] return html; } },Hi GabrieleMartino,
The cellsrenderer callback function is called when the column is rendered on-screen. If a column is hidden, its cellsrenderer function will not be called.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.