Make only certain columns editable in SlickGrid - slickgrid

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.

Related

Adding tooltip to rows in treeview in gtkmm

I am using a Gtk::TreeView to create a tree view in gtkmm. It has two columns. The first column has two types of icons in different rows. One icon is used to add an element to the tree and the second is used to delete the element from the tree.
I have accessed the column number of the first column and added tooltip to the icons. However, I need different tooltips for both the icons.
A variable COL_ADD is used to compare the column using:
if (col == _tree.get_column(COL_ADD-1)) {
set_tooltip_text(_("Add selection to set"));
}
where col is Gtk::TreeViewColumn.
Since both the icons belong to same column, so they are getting the same tooltip. How do I differentiate to get the corresponding rows of icons to add different tooltips to them?
I guess that Gtk::TreeView::set_tooltip_cell() is what you need:
https://developer.gnome.org/gtkmm/stable/classGtk_1_1TreeView.html#ae7cc8fde03c481de81fc9d13e34bff98

SlickGrid deleting a column does not delete its data

I am adding a new column to SlickGrid using of course grid.setColumns(newColumnDef);
I allow the user to then enter values into this new column
If they so choose they can remove this column and add another column which they can select from a dropdown list.
This all works fine, the column gets removed and the grid appears without the removed column. However when I call dataView.getItems() to grab the data from the grid the columns I'vd previously removed are still there. Looks like setColumns with a new column definition and dataView.refresh does not delete the columns data, just the column is removed. I need to remove the columns data when the column is removed... Any suggestions would be most helpful.
Changing the presentation of the data does not change the data itself.
Use deleteItem method of dataview as follows,
dataView.deleteItem(id);\\where id is your unique id
dataView.refresh();`

Deleting column in devexpress grid

I want to delete column in devexpress grid without using Customization window. For example: by dropping column out of grid or there will be a X button on column that will delete it. Is it possible?
It is possible to drag-drop a particular ASPxGridView Column into the Customization Window or hide the Columns programmatically.
See the following Examples:
E3812
E2023
E3031
If you want to show/hide an individual Column while export, use the solution from the E3352 Example.

Want to fix some columns

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...

jqGrid: set column property dynamically

I need to show/hide columns in jqGrid and to filter grid results.
For hiding and showing I use global array on the page. It keeps state.
For searching and filtering I use build-in filter dialog.
For invisible columns I set property "search" for "false"(nobody wants to sort results if he doesn't see it) so...there is no such column in the filter list. But when I show any column that was hidden(I call $("#jqgrid").showCol(colName);) then this column doesn't appear in the filter list. Of course, I have to change column's "search" property. But how??? Is it possible?
Thanks in advance

Resources