How to set dropdown width in handsontable - handsontable

I am trying to set width of handsontable dropdown to be according to the lookup data width, not column width. How can this be achieved?
See picture below please. Dropdown is too narrow to fit lookup data.

https://github.com/handsontable/handsontable/issues/2599
Github has a section on this.
Add the trimDropdown property. By default, this property is set to true. If you set it to false, this should accomplish what you need to do.

Yes, the Github fix on 0.16 will include this solution. It's actually really nice, I'm using it already.

Related

Adding checkbox inside a listview in dhtmlx

How can i add check box inside combo box within the grid view.
As far as I know - it impossible, but they have similar editor type - "clist", check
http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/09_pro_excell_extra.html
You can outside the grid view, like this link suggest (from the official dhtmlx forums).
But inside the grid you cannot.
The closest answer I found on the official dhtmlx forums said:
There is no special integration of combo with checkboxes and dhtmlxgrid.
"combo" column type purposed to be used with plain combobox mode only.
Technically it possible to change it , so it will render as list with checkboxes, but checked values will not be accessible through grid's API
I hope this answer could help you. If not, you should ask the dhtmlx team directly, as it does not seem to be possible without imperfect workarounds.

how to set the cell background color baced on the cell value in jqgrid?

I'm using jqgrid. I need to set background color of the cell based on the values.
I have tried using the following code after reload the table the color is disabled.
jQuery("#list").setCell
('5','5','t',{background:'#ff0000'});
I want to set the cell background color on table loading, based on the cell values.
how to do this?
Thanks in advance.
You can do this in many ways: see this, this or this. Important is not only how you do this, but where. The loadComplete event handle is the good place for that.
UPDATED: In the next version of jqGrid you will able to use new cellattr option as function in the colModel. See this demo and my original suggestion.
To use the cellattr functionality with the asp.net library of jqGrid, add this to your column. I can't find this documented well anywhere else online...
<Formatter>
<trirand:CustomFormatter SetAttributesFunction="clientSideFunctionName" />
</Formatter>
And Thank Oleg for the awesome addition to jqGrid :)

Programatically hiding images in Telerik RadGrid image columns

Greetings,
I've got a RadGrid populated with data from a DB. I've also got an image column which is to display an icon based on whether or not a specific boolean property (called IsDirty) of the object populating the row is true or false. If it's true, show the icon in the image column; if not, show nothing. The icon is the same for every row.
What I'm wondering is if and how this can be done. The best solution I've come up with so far is a hack that would change the image source path based on the value of IsDirty, but this isn't really acceptable, since my app is skinnable and showing a blank image would ruin the look.
Thanks in advance for any help.
I know a help topic that may get you started - it is located here:
http://www.telerik.com/help/aspnet-ajax/grdconditionalimagedisplayingridcolumn.html
Dick

Resize the JQGrid column at runtime

I need to resize the JQGrid column at runtime.
For eg: the column width for the column was 100px when it is loaded. I need to change it to 200 afterwards.
Please help.
Unfortunately there is no way to do this using the jqGrid API. From the documentation:
As mentioned above the options in colModel can be get or set using the methods getColProp and setColProp. Below are options which can not be changed dynamically when the grid is constructed (If changed they do not have effect or will cause the grid errors). For some of these options there are methods available to change the value:
name
width
resizable
label (method avail.)

Is it possible to dynamically change the page size in a YUI Paginated Datatable?

I have a YUI Datatable which is paginated. The height the datatable is able to use can change. What I want to happen is that when there is a size change (which I already have a handle on), I can take the new height and find how many rows are going to fit in a page, then change the datatable or it's paginator to have that number of rows.
Is this something that is possible with YUI Datables, if so is there examples or documentation about it?
myDataTable.get('paginator').setRowsPerPage(25);
It appears that if you can get a reference to the YAHOO.widget.Paginator instance, you can call:
theTablesPaginator.setRowsPerPage(numRows, silent)
Where the silent option allows setting whether the changeRequest event should be sent. If you wish the datatable to redrawn, set this to false.
Reference: the very useful official YUI documentation

Resources