Author Topic: Hidden Property Not Working  (Read 5223 times)

jax

  • Newbie
  • *
  • Posts: 16
    • View Profile
Hidden Property Not Working
« on: June 18, 2014, 06:44:55 am »
I am trying to hide the PrimaryKeyId of a value using the hidden property but when I place hidden on the column model, it does not render even as a hidden value. If I remove the hidden property from the column model then the value is visible. What am I am missing here?

 obj.colModel = [{ title: "Code", width: 100, dataIndx: "SpecialityCode", dataType: "string" },
            { title: "Description", width: 400, dataIndx: "Description", dataType: "string" },
            { title: "SpecialtyId", hidden: true, dataIndx: "SpecialtyId", dataType: "integer" }];

Here's the html for a record, it does not render the SpecialtyId or third column.

<tr pq-row-indx="3" class="pq-grid-row">
 <td class="pq-grid-number-cell ui-state-default">4</td>
 <td class="pq-grid-cell " pq-col-indx="0">AMB</td>
 <td class="pq-grid-cell " pq-col-indx="1">Services</td>
</tr>
« Last Edit: June 18, 2014, 08:43:34 am by jax »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Hidden Property Not Working
« Reply #1 on: June 18, 2014, 07:56:19 am »
Hidden columns are not rendered in the view.

jax

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Hidden Property Not Working
« Reply #2 on: June 18, 2014, 08:42:04 am »
So when I get row data to save an edited row, will I have access to the hidden field data?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Hidden Property Not Working
« Reply #3 on: June 18, 2014, 09:39:46 am »
yes! ParamQuery Grid keeps view and data separate.

Data or model is the ultimate truth, so you read and manipulate the data most of the times and ParamQuery keeps the view in sync with your data.

hidden field data  = rowData["dataIndx of hidden column"]
« Last Edit: June 18, 2014, 09:49:45 am by paramquery »