jVectorMap - How to show region label and not only select region with external link - jvectormap

I need to show a HTML label when I select a region from external link.
I can select region using this: map.setSelectedRegions([region]) but this doesn't show region label.
Anyone could help me with this? Could I generate this label with HTML content?

Try this
onRegionClick:function(event, code, region){
switch(code){
case"your_state":
window.location.replace("http://your_link_address/");
break;
case"your_state":
window.location.replace("http://your_link_address/");
break; }
}
Change "your_state" to your state/region. Change "your_link_address" to your address.

Related

Tornadofx Tableview row count

Hey guys can someone please enlighten me. what is the best way to have a label display SortedFilteredList size. I have a tableview and I want a label showing the current table row count while filtering using filterwhen
All you need to do is to create a StringBinding towards the sizeProperty of the SortedFilteredList. I've added an example to the TableViewSortFilterTest in the framework, check out https://github.com/edvin/tornadofx/blob/master/src/test/kotlin/tornadofx/testapps/TableViewSortFilterTest.kt for a complete example. Here I add an informational hbox to the bottom of the screen:
hbox(5) {
label("Filter count:")
label(data.sizeProperty.stringBinding { "$it records matching filter" })
}
The data property is my SortedFilteredList instance.

Is there anyway to identify which editor is currentEditor in SlickGrid?

I wanted to identify which Slick editor is being used in the current selected Column. Is there anyway to do this?
Ok, I got.
We can use activeCell with columns to get the current select column. Then from the column.editor attribute, we cloud compare what is the editor currently select cell possess.
var column = columns[activeCell];
if(column.editor && column.editor === Slick.Editors.Text)
{
// Code with identification.
}

hiding crosstab columns in BIRT when format is excel

I want to hide two of the crosstab columns based on some condition. I have been able to achieve it by using
function onPrepareCell( cell, reportContext )
if(some condition){
if( cell.getCellID() == cell#){
cell.getStyle().setDisplay("none");
}
}
in the onPrepare event of cross tab. It works fine in PDF,HTML format but the columns are not getting hidden when the format is Excel. I need to get this done soon please help
I got the answer from BIRT exchange i am posting the answer here so that it may be helpful to others
In the onPrepare() event of crosstab you can write the code as given below
function onPrepareCrosstab( crosstab, reportContext )
{
if(some condition ){
reportContext.getDesignHandle().getElementByID(ElementId#).setStringProperty("width","0px");
}
}
here ElementId# is the Id# of the cell you want to hide. As you can see we can also use this to change the width of the cell dymanically.
Try your code in an OnCreateCell event.

scoll in select option disabled after using jqtransform

I have a problem with Jqtransform , when it transform the select input , it disable scrolling on the option value and make it appear very long drop down selection
like in the image i attached ![enter image description here][1]
i need help please
Thanks
http://imm.io/pi0d
jquery.jqtransform.js
add this code -> .css('height', 120)
line=265
looks like
var $ul = $('ul',
$wrapper).css('width',$select.width()).css('height', 120).hide();
Rather than giving height to it I would suggest give it an overflow-y:scroll
var $ul = $('ul', $wrapper).css('width',$select.width()).css('overflow-y', 'scroll').hide();
Let the height be given through CSS and not through JS...
Hope this helps :)

Telerik MVC grid-How to set default row selected

Is it possible to render a Grid with one row selected as default (set the right page number and highlight the row)?
For highlighting, try using the "OnRowDataBound" event
.ClientEvents(events => events.OnRowDataBound("onRowDataBound"))
with something like
function onRowDataBound(e) {
var myId = $('#MyId').val();
if (e.dataItem.Id == myId)
e.row.className = 't-state-selected';
}
I'm still trying to figure out how to set the correct initial page number. This bloke might be on to something.
Use the Grid RowAction method, eg:
.RowAction(row => row.Selected = row.DataItem.CustomerCode.Equals(ViewBag.ID))
It is perhaps possible if you iterate in the grid source, locate the row which has to be selected in it, than use a formula to detect on which page will be displayed, and finally change the page index on initial load and select it.

Resources