My jqGrid library version is 4.4.3.
How to remove/hide the red color vertical column? I added this extra vertical column because I want to place my priceCatGrid slightly below right of 'Product Name'. If remove this extra vertical column, my priceCatGrid's location will be directly below the starting of 'Product Code', which is not what the user wants.
First of all I see a error in your code - the name in colModel should not be empty as you do. In all cases the name should be present and it should not contain spaces.
There are a methods called showCol and hideCol, which do what you want.
$("#grid").jqGrid("hideCol", "name_of_the_column")
where name_of_the_column should be existing name of colModel and should not be empty string.
thank you for your help, I have found that using .css('visibility','hidden') instead of hide achieves my objective.
Related
I have an ExtJs GridPanel in which sortable is false in all the columns.
Then if I sort store by
this.store.sort('Column1','ASC');
then the arrow reappers .
Does sortable gets true?
Is this because I am sorting the store or anything else?
If it the reason different than that then what is the solution for removing the arrow?
I would appreciate any help on this.
The arrow is being shown because of the sorter in the store, which identifies a column in the grid which has the dataIndex equal to the property you are sorting, despite the sorting being disable on this column. In this case, you could override the getSortParam function in your column definition, like this:
getSortParam: Ext.emptyFn
And your column will no longer show the arrow in the header.
how can display items of a hidden colmodel when mouse over another column which shows only some part of the data. in user column i have many names, i only display first user name and rest the count. so i passed the full names as hidden. I want to display that names according to the mouseover
If I correctly understand the problem you can solve it by usage cellattr callback which defines title attribute based on the value of another (hidden) column. See the answer for the corresponding code example.
I'm using kendo grid (which is awesome!) and one of my columns contains a description field. Does kendo come with support for expanding columns? i.e. if over a certain length display a '+' expand icon or will I need to use a third party library?
Thanks
If you want to expand a record, you might use detailTemplate and maybe also detailInit event. Remember that detailTemplate might be either a string (KendoUI template) or a function. This demo shows how to use it.
If you want to expand a column, you should use a template in the column (see it here) definition and program there the logic needed.
Grids do come with a resizing property. Not sure if this fits your needs though.
http://demos.kendoui.com/web/grid/column-resizing.html
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.
I'm using a jqGrid, and it gets populated fine. From the UI perspective, one of the columns in the jqGrid is editable. How can I make one of the columns as editable (say like a text box)?
The reason is, in my case when the grid successfully loads, the UI is going to show one of the column's values as editable.
If you're looking to edit the column values directly in the grid, similarly to how you might in Excel, look into the inline editing API:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing&s[]=inline
In colmodel, you have to specify editable: true.Provide edit action link in editURL:... option of jqgrid.
you have to get the "id" of that column and then remove 'disabled' attribute on that.
for example -
$('#idofthatcolumn').removeAttr('disabled');
OR
$('#idofthatcolumn').removeAttr('readonly');
In your colmodel you should specify editable as true i.e, editable:true and specify the editUrl:'localhost:8080/yourApp'
Also if you want to store it in the client side, then specify it as editUrl:'clientArray'