You could also add the cell to the Buttons tag property.
Hi Frank,
That was fast! 🙂 Thanks!
I think the way to follow is UserData. I don’t see how to use CurrentCell in the Button_Click event. The CellClicked event does not seem to fire when I click on the button contained in the cell.
Best,
Alex
Hi Alex,
You can either use the CurrentCell.RowIndex property or store a reference in UserData.
Please take a look at the simple sample attached. It uses both techniques.
Hope that helps.
Best regards
Frank
I don’t think the designer is liking the data urls. The triangles are still appearing when selecting my theme.
Nevermind I think I figured it out just went to this website. Put the link to the google font and generated a data uri
If I wanted to use the Roboto font from google whats the best way to get it into the theme file to avoid the exclamation marks?
Please check in dev tools if there is a javascript error. Also turn on “debug”:true in the json config.
We are going to release nested rows soon. We just release the super cool feature to let you add controls into cells, and headers. The next enhancements on our grid are going to be the selection mode, and sizing mode.
The DGV control is tightly integrated with the server, way more than any other javascript grid, and it’s a super complex control. It’s also quite easy to use javascript widgets that provide more fancy features on the client and simply take a data feed from the server (which is most if not all the javascript grids available). With Wisej.Web.Widget, simply respond to WebRequest and feed the grid from the server, it’s a lot simpler than having to create rest endpoints.
We have a set of samples and a blog coming up showing pivot grid, filtering grid, etc.
Best,
Luca
Hi Tim,
When the third party widget calls back your event handler the context (this) in javascript is usually lost and “this” ends up referring to window. Wisej (qooxdoo) widgets always call their callbacks preserving the context.
In your sample and fix the problem is that when you are in SigImageCallback() “this” is already lost. If you assign “var me = this” in there it’s too late. There are 2 solutions:
Solution 1: Do not use the function, use a closure
var me = this;
GetSigImageB64(function(){
// here me is preserved.
});
Solution 2: Bind the callback function to the context.
GetSigImageB64(SigImageCallback.bind(this));
The call to bind() is a javascript feature that builds a function bound to the context passed in bind. The code above works as long as “this” is the Wisej widget.
HTH
Best,
Luca
Hi Tim,
try to store a reference to this before the callback:
var me = this;
and use me instead of this after the callback.
Hope that helps.
Best regards
Frank
Sorry to be a pain but I am getting so frustrated right now trying to get this last part done.
When the following is run from the code I posted earlier it calls the SigImageCallback but when in this callback I can not call this.fireWidgetEvent(“myeventname”, “Hello”) It says it is not part of the class.
GetSigImageB64(SigImageCallback);
Any help would be greatly appreciated.
Tim Larson
Luca, I meant to reply to the earlier thread here about this (https://wisej.com/support/question/actually-applying-a-mixin-for-grid-less-listview)
Regarding Gridlines:
I am wondering if it would be best to have it specify Vertical, Horizontal, Both, or None?
Because I would like to be able to make use of multiple-style listviews, with either “both” (horizontal and vertical) or “none” (neither horizontal or vertical) … which as far as I know is still not possible without overriding the cell renderer.
In my modified theme “modified-Blue1a-ListViewGridLines” I set it to include both the horizontal and vertical by default, but then setting GridLines to false has no effect. Hope this makes sense. Thanks again,
Andrew
Thanks Marian,
I have logged WJ-8260 for it.
We´ll let you know when it´s fixed.
Best regards
Frank
Hi Tim,
you can use the same technique we used in the last eSignature sample code:
.fctbNone{ color:#000000; }
.fctbStyle0{ color:#2e75b6; }
.fctbStyle1{ color:#a31515; }
change: function(e)
{
me.fireWidgetEvent("change", {lastImage: e.lastImage});
}
You can send any data back to the Wisej.web.widget on the server using this.firewidgetEvent (“myeventname”, data), i.e.
this.fireWidgetEvent(“myeventname”, “Hello”) or
this.fireWidgetEvent(“myeventname”, {text:’hello’, count:12, ‘base64:here38jd232d2’});
The Wisej.web.widget will then fire WidgetEvent. The data is available in e.Data as a dynamic object
or the actual simple value, i.e. string name = e.Data or string name = e.Data.text.
Best regards
Frank
I have a widget for a signature pad from Topaz Systems. What I want to do is return the sigImageCallback value to the server. Right now I created the server side text box and it populates the value. Is there a way I can get the string of the image passed back to the server so I can save it to the database? I thought I may have to do an onchange event on the container but it didn’t work.
this.init = function() {
// your initialization code.
var me = this;
this.container.innerHTML =<canvas id=’cnv’ name=’cnv’ width=’304‘ height=’99‘></canvas>
}
this.onSign = function(){
var ctx = document.getElementById(‘cnv’).getContext(‘2d’);
SetDisplayXSize( this.getWidth() + “px” );
SetDisplayYSize( this.getHeight() + “px” );
SetTabletState(0, tmr);
SetJustifyMode(0);
ClearTablet();
SetKeyString(“0000000000000000”);
SetEncryptionMode(0);
if(tmr == null)
{
tmr = SetTabletState(1, ctx, 50);
}
else
{
SetTabletState(0, tmr);
tmr = null;
tmr = SetTabletState(1, ctx, 50);
}
}
this.onDone = function(){
if(NumberOfTabletPoints() == 0)
{
alert(“Please sign before continuing”);
}
else
{
SetTabletState(0, tmr);
//RETURN TOPAZ-FORMAT SIGSTRING
SetSigCompressionMode(1);
//document.FORM1.bioSigData.value=GetSigString();
//$(“#sigStringData).text += GetSigString();
//this returns the signature in Topaz’s own format, with biometric information
//RETURN BMP BYTE ARRAY CONVERTED TO BASE64 STRING
SetImageXSize(275);
SetImageYSize(60);
SetImagePenWidth(5);
GetSigImageB64(SigImageCallback);
}
}
function SigImageCallback( str )
{
var txt1 = document.getElementsByName(‘sigStringData’)[0];
txt1.value = str;
}
Hi Tim,
can you please share some more details on how you are setting the textbox value ?
If you set it directly on the DOM element, it won´t fire. If you use the API like
this.setValue (“hello”)
or
this.textBox1.setValue (“hello”)
it will fire.
Hope that helps.
Best regards
Frank
Hi Jonatha,
yes, you can refer to the OpenForms collection to test if your window is already opened and check its WindowState property
to see if it is minimized.
The OpenForms is session isolated as anything else in Application.
Only static properties are shared across sessions.
Best regards
Frank
Yep, the docs are update at a much slower pace since every time it takes several hours to upload 7,600+ pages.
The property ListView.GridLines is a boolean that can only turn grid lines on or off. What on and off means depends on the theme. The built-in themes have vertical grid lines for the listview or no lines at all when off. You can change that with a mixin (there are couple of examples on the forum), in short this is what you need for horizontal grid lines:
{
“appearances”: {
“listview”: {
“inherit”: “listview”,
“components”: {
“grid-cell”: {
“states”: {
“default”: {
“styles”: {
“widthRight”: 1,
“widthBottom”: 1,
“color”: “table-column-line”
}
},
“borderNone”: {
“styles”: {
“widthRight”: 0,
“widthBottom”: 0
}
}
}
}
}
}
}
}
The DataGridView has a different property CellBorderStyle that is an enumeration with None, Single, SingleVertical, SingleHorizontal, etc. The meaning of each stat is define in the themes.
Thanks Andrew,
we could reproduce that IE specific problem and logged it as WJ-8259.
A fix will be in the next release. We´ll notify you when it is available.
Best regards
Frank
Thanks. The error only appears in the javascript console right? It’s logged as WJ-8257 and fixed in our build.
Wisej optimizes the round trips. When you add an item and delete it before it’s sent to the client, the item is not sent at all (the list in your sample seems correct), but for the combobox it ended up sending back the request to remove the item as well, which doesn’t exist on the client.
