Hi Adil,
WebSocket is a browser feature, you cannot open a websocket client from a server process. (you could using a browser process, or creating a websocket client, but it’s extremely messy).
If your apps are on the same IIS and on the same pool they can share static variables making it very easy for two or more apps to communicate by sharing memory.
HTH
/Luca
Thank you.
I have logged issue WJ-8305 for the CurrentRow in SelectionChanged event.
Could not reproduce the problem with the SelectedRows property you have described. It seems to be fixed with WJ-8251.
Best regards
Frank
Hi Shawn,
how did you include the image ? As an embedded resource ?
Can you share a sample or more details ?
Thanks in advance.
Best regards
Frank
Thanks Wilfred.
I have logged issue WJ-8304 for it and we are working on a fix.
We´ll inform you when it´s available.
Best regards
Frank
Thanks Luca & Frank. It looks like the first option works ok. It takes a few mouse clicks to get the date field in the property grid to enter an edit mode, but it works.
However, I’ve noticed a different problem. If I add the following:
private void propertyGrid1_SelectedGridItemBeginEdit(object s, SelectedGridItemBeginEditEventArgs e)
{
if (e.GridItem.PropertyDescriptor.PropertyType == typeof(DateTime))
{
DateTimePicker dtPicker = new DateTimePicker();
dtPicker.Format = DateTimePickerFormat.Custom;
dtPicker.CustomFormat = “dd-MMM-yyyy”;
e.Editor = dtPicker;
}
}
… when the DateTime field in the property grid gets the focus, the date format ‘dd-MMM-yyyy’ is used, which is correct, but as soon as that DateTime field loses the focus, the date format reverts to ‘M/dd/yyyy’ format. This is a bit odd because if I add a DateTimePicker control directly onto the form then set the custom format to ‘dd-MMM-yyyy’, that format remains regardless if the control has the focus or not, so there must be some underlying setting that is controlling that display format in the property grid.
I checked the regional settings on my computer and short date is definitely set to ‘d/MM/yyyy’ so all good there. Maybe there needs to be 2 properties to control the date format, one for editing and one for displaying/viewing.
Hi Ben,
thanks for sharing more details. What you observe is not a bug but rather a feature.
Let me explain in more detail:
PerformClick for a button is only executed when the button is enabled and visible. It´s basically the same in WinForms.
So if the button is in a form or on a tab page that is not visible, then PerformClick does not work.
It´s by design and it prevents JavaScript Code from clicking disabled or inivisble Buttons and potentially executing Code
that is not supposed to be executed.
If your app needs to execute a method simply call that method or handler directly. Otherwise letting disabled or inivisble
buttons execute clicks is a vulnearbility.
Hope that helps.
Best regards
Frank
Hi, if it is hard to implement, is there anyway to call pdfView.Print by code ?
Hi Frank,
‘—————–
AddHandler lv.ButtonDV.Click, Function(sender, x) ShowDocumentView(lv)
AddHandler lv.ButtonLV.Click, Function(sender, x) ShowListView(lv)
‘—————–
Private Sub ButtonListView_Click(sender As Object, e As EventArgs) Handles ButtonListView.Click
Dim selectedTab As TabPage = TabControlMain.SelectedTab
If Me.Controls.Find(String.Format(“ButtonLV_{0}”, objectKey(selectedTab)), True).Count > 0 Then
Dim buttonLV As Wisej.Web.Button = Me.Controls.Find(String.Format(“ButtonLV_{0}”, objectKey(selectedTab)), True)(0)
If buttonLV.Enabled Then buttonLV.PerformClick()
End If
End Sub
‘—————–
Private Function ShowListView(Optional lv As ListViewer3 = Nothing)
If lv Is Nothing Then
Dim selectedTab As TabPage = TabControlMain.SelectedTab
lv = selectedTab.Controls.Find(“ListViewer3”, True)(0)
End If
lv.viewMode = “L”
SplitContainerHideShowDocumentList.Panel1Collapsed = True
PictureBoxNavigationTree_Refresh()
‘ButtonPrint.Visible = False
lv.ButtonLV.Enabled = Not (lv.viewMode = “L”)
lv.ButtonDV.Enabled = Not (lv.viewMode = “D”)
lv.DataGridViewDocDetail.Visible = True
lv.TableLayoutPanelPreview.Visible = False
ButtonSelect.Visible = (lv.viewMode = “L”)
ButtonListView.Enabled = (lv.viewMode = “D”)
ButtonDocumentView.Enabled = (lv.viewMode = “L”)
lv.TableLayoutPanel1.Visible = False
lv.TableLayoutPanel2.Visible = False
lv.TableLayoutPanel4.Visible = False
lv.TableLayoutPanel8.Visible = False
TableLayoutPanelNavigationTree.Visible = True
TableLayoutPanelDocumentList.Visible = False
Dim selectedRow As DataGridViewRow = Nothing
If lv.DataGridViewDocDetail.Rows.Count > 0 AndAlso Me.DataGridViewDocList.CurrentRow IsNot Nothing Then
selectedRow = SearchDGV(lv.DataGridViewDocDetail, “ID”, Me.DataGridViewDocList.CurrentRow.Cells(“ID”).Value)
End If
‘select related row
If selectedRow IsNot Nothing AndAlso selectedRow.Cells(“Document Name”).Visible Then
selectedRow.Selected = True
If selectedRow.Cells(“Form ID”).Visible Then lv.DataGridViewDocDetail.CurrentCell = selectedRow.Cells(“Form ID”)
If selectedRow.Cells(“Document Name”).Visible Then lv.DataGridViewDocDetail.CurrentCell = selectedRow.Cells(“Document Name”)
Application.Update(Me)
Else
If lv.DataGridViewDocDetail.Rows.Count > 0 Then
lv.DataGridViewDocDetail.Rows(0).Selected = True
If lv.DataGridViewDocDetail.Rows(0).Cells(“Form ID”).Visible Then lv.DataGridViewDocDetail.CurrentCell = lv.DataGridViewDocDetail.Rows(0).Cells(“Form ID”)
If lv.DataGridViewDocDetail.Rows(0).Cells(“Document Name”).Visible Then lv.DataGridViewDocDetail.CurrentCell = lv.DataGridViewDocDetail.Rows(0).Cells(“Document Name”)
Application.Update(Me)
End If
End If
Return True
End Function
Hi Jonatha,
the latest Wisej release 1.3.74 contains our initial version of the Accordion control.
Best regards
Frank
Following up on your question, you might want to take a look at our 2 latest blog articles:
Integration Part I (DevExpress)
Integration Part II (SyncFusion)
Hope that helps.
Best regards
Frank
Hi Levie,
I have tried to reproduce that here but failed so far. Can you please share some more details / code ?
Are those DateTimePicker controls located on the same form ? Do they have the same Format / Locale. Any Events attached to them ?
Thanks in advance !
Best regards
Frank
Thanks.
We have logged this problem as WJ-8298 and it will be fixed in the next Wisej build.
Best regards
Frank
Hi Andrew,
we have logged this issue as WJ-8297 and a fix will be included in the next Wisej build.
Best regards
Frank
Hi John,
there are a couple of options to control the loader icon that is currently displayed:
<div id=”my-loading-screen” style=”position:absolute; z-index:100; width:100%; height:100%; background-color: darkorange”>
<div style=”font-size: 34pt; text-align: center”>
LOADING…
</div>
</div>
<script>
Wisej.onLoad = function () {
document.getElementById(“my-loading-screen”).remove();
}
</script>
</body>
Please note that “style=”position:absolute; z-index:100;” will not be needed anymore with the next Wisej build(s). It´s necessary because of a background definition in the default qooxdoo theme that will be removed.
The Wisej.onLoad event is fired when the Wisej loader has finished, thus it removes the div in this sample.
Hope that helps.
Best regards
Frank
Hi
What about afterPrint and beforePrint in viewer.js?
https://searchcode.com/codesearch/view/86501454/
Yes, unfortunately we missed that it picks up the System.ComponentModel.Design.DateTimeEditor.
There are two possible workarounds:
1. Override or handle PropertyGrid.SelectedGridItemBeginEdit:
private void propertyGrid1_SelectedGridItemBeginEdit(object s, SelectedGridItemBeginEditEventArgs e)
{
if (e.GridItem.PropertyDescriptor.PropertyType == typeof(DateTime))
e.Editor = new DateTimePicker();
}
This lets you fully control any cell editor in the PropertyGrid.
2. Or modify the TypeDescriptor to return null to let the Wisej.Web.PropertyGrid use the default DateTimePicker:
This takes as bit more code.
You need two classes like this.
internal class DateTimeTypeDescriptorProvider : TypeDescriptionProvider
{
private static TypeDescriptionProvider defaultTypeProvider = TypeDescriptor.GetProvider(typeof(DateTime));
public DateTimeTypeDescriptorProvider() : base(defaultTypeProvider){}
public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
{return new DateTimeTypeDescriptor(base.GetTypeDescriptor(objectType, instance), instance);}
}
internal class DateTimeTypeDescriptor : CustomTypeDescriptor
{
public DateTimeTypeDescriptor(ICustomTypeDescriptor parent, object instance) : base(parent) {}
public override object GetEditor(Type editorBaseType) { return null;}
}
Then you can override the system’s TypeDescriptor for DateTime at startup or at any time before the PropertyGrid is created.
if ((TypeDescriptor.GetEditor(typeof(DateTime), typeof(UITypeEditor)) != null))
TypeDescriptor.AddProvider(new DateTimeTypeDescriptorProvider(), typeof(DateTime));
Your code is correct. The issue seems to be timing and our obsession with releasing references 🙂
The ContextMenu class has this:
case “disappear”:
OnCollapse(EventArgs.Empty);
this.SourceControl = null;
break;
So when the context menu “disappear” event fires before the menu item click event we get the issue you described. In wisej/qooxdoo “appearing” and “disappearing” of widgets is managed by an async fast dom manager and will occur out of sync to speed up browser rendering. We’ll log and fix.
As a workaround you can use the UserData property, on any single MenuItem after adding it:
miDelete.GetContextMenu().UserData.Button = sbtn;
Then in the click event you’ll find mi.GetContextMenu().UserData.button.
You can use Parent or GetContextMenu(). Parent works for first level menu items only.
Also, if the button can only perform one of the 3 actions, you may use a Button instead of a SplitButton.
HTH
/Luca
Very hard if not impossible. The pdf viewer used depends on the browser. With Wisej you can select either the native viewer, google docs, mozilla pdf.js or your own viewer. You could clone the pdf.js viewer to your server and see if you can hook up an event in the source code.
See also: https://stackoverflow.com/questions/1234008/detecting-browser-print-event
The problem is that even this technique doesn’t work, it fores both events immediately and only when printing the page. If you print the pdf viewer it doesn’t since the viewer is an embedded object with a different dom.
/Luca
Hi Frank,
It’s fixed and working as expected (1.3.74)
Thanks.
Hi Frank,
it’s fixed in this release (and since 1.3.71).
Thanks.
