Is it possible to hide Slickgrid/dataview primary key column? If yes, how can we do that? Any example?
I have a Slickgrid that is using Dataview. I do not want to show the primary key column to user in some specific conditions.
thanks
In the column definition, set the width property of your primary key to 0. Doing so will visually hide the column.
Related
I want to update the master column in my detail IG but I can't. When the page submits the old value returns. All the other columns updates as expected.
Any suggestions?
Basically, you want to move detail row to another parent, right?
It seems that you can't do that in a master-detail form because that column is used to enforce referential integrity; in detail block, its "Master column" property is set to master region's primary key column.
Initially, detail primary key item is hidden. It means that it is always inherited from the selected master record. If you add a new row, it'll belong to that master. So, if you unhide it (and set it to e.g. text item) so that you'd be able to update its value, processing "reverts" your changes and sets the detail region primary key value to the same selected master's primary key value.
What to do? Create another page which will be based on detail table, then there won't be any restrictions of that kind (i.e. you'll be able to change the primary key column to point to another master).
I currently have a master detail form within my APEX application which should show two columns, one of which should be the primary key.
However, it appears that my primary key column has been replaced with the "edit" button/column, which I also want to keep. When I try and edit the attributes for the primary key column, changing the "display as" option appears to have no effect, and the edit button remains.
Currently my form looks like this:
And the column attributes look like this:
And ideally, I would like an additional column to this, but with the primary key values after the edit button.
I imagine there's something very simple which I'm missing!
The edit link properties come from attributes within the column. If you click on the pencil in your second image, that will show column attributes. Look for "Action" attributes that describe the link to another page. The "Link Text" will be referencing the edit icon. You could replace this with #COPYID# to show the primary key value as a link. Or you could add another column "copyid as copyid_dsp" to show both.
For example, I have two tables UNIT_OF_MEASUREMENT and PHYSICAL_QUANTITY. PHYSICAL_QUANTITY has a field what represents foreign key of UNIT_OF_MEASUREMENT table. When i add this relationship, PHYSICAL_QUANTITY_UNIT_OF_MEASUREMENT_FK at PHYSICAL_QUANTITY table is shown. How can i hide this element (not relationship) from table?
There is way to hide primary key elements from table. Just Right-click at table -> select "Show / Hide elements" -> select elements that must be hidden and click "OK".
But PHYSICAL_QUANTITY_UNIT_OF_MEASUREMENT_FK element is not shown there.
Why? And is there a way to hide PHYSICAL_QUANTITY_UNIT_OF_MEASUREMENT_FK element from table? Thanks.
You can select the elements that you need to be shown by right clicking on the diagram (not in the tables), and selecting the ones you need in View Details
I want to fix some columns so that user cannot drag and drop these columns and cannot reorder these columns also.Is it doable how can i do it.
There is code inside grid.jqueryui.js that uses the jQuery UI Sortable Interaction to enable drag-and-drop columns.
The following selector determines which columns can be dragged-and-dropped:
"items": '>th:not(:has(#jqgh_'+tid+'_cb'+',#jqgh_'+tid+'_rn'+',#jqgh_'+tid+'_subgrid),:hidden)',
So basically the selector will choose any column header that is not hidden and does not satisfy one of the following criteria:
#jqgh_'+tid+'_cb' - A checkbox column (for multi-select)
#jqgh_'+tid+'_rn' - A row number column (for primary key?)
#jqgh_'+tid+'_subgrid - A subgrid column
To satisfy your request, jqGrid would have to be modified to populate the items selector with blacklisted columns. Maybe the blacklisted columns could be flagged using a new colmodel option. This is all do-able, but requires changes to jqGrid itself...
I have a grid with multiple columns and I use the first column for a row label. I looked at the example for making the grid editable, but that appears to make the whole grid editable. Is there away to specify a certain column(s) only?
Got it! By not setting the editor property on the column object the column is non-editable.