Hi Luca,
I took your suggestion a step further and forgot all about Wisej.Web.IBindableComponent and used instead System.Windows.Forms.IBindableComponent.
The end result work as well as the other one, meaning it raises the same exception after changing one form property.
using System.ComponentModel;
#if WISEJ
using System.Windows.Forms;
#else
using System.Windows.Forms;
#endifnamespace MvvmFx.WisejWeb
{
/// <summary>
/// Data binding enabled StatusBarPanel.
/// </summary>
public class StatusBarPanel : Wisej.Web.StatusBarPanel, IBindableComponent, IHaveName
{
#region IBindableComponent Membersprivate BindingContext _bindingContext;
private ControlBindingsCollection _dataBindings;/// <summary>Gets or sets the collection of currency managers for the <see cref=”System.Windows.Forms.IBindableComponent” />. </summary>
/// <returns>The collection of <see cref=”System.Windows.Forms.BindingManagerBase” /> objects for this <see cref=”System.Windows.Forms.IBindableComponent” />.</returns>
/// <filterpriority>1</filterpriority>
[Browsable(false)]
public BindingContext BindingContext
{
get
{
if (_bindingContext == null)
{
_bindingContext = new BindingContext();
}
return _bindingContext;
}
set { _bindingContext = value; }
}/// <summary>Gets the collection of data-binding objects for this <see cref=”System.Windows.Forms.IBindableComponent” />.</summary>
/// <returns>The <see cref=”System.Windows.Forms.ControlBindingsCollection” /> for this <see cref=”System.Windows.Forms.IBindableComponent” />. </returns>
/// <filterpriority>1</filterpriority>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ControlBindingsCollection DataBindings
{
get
{
if (_dataBindings == null)
{
_dataBindings = new ControlBindingsCollection(this);
}
return _dataBindings;
}
}/*/// <summary>Gets or sets the collection of currency managers for the <see cref=”System.Windows.Forms.IBindableComponent” />. </summary>
/// <returns>The collection of <see cref=”System.Windows.Forms.BindingManagerBase” /> objects for this <see cref=”System.Windows.Forms.IBindableComponent” />.</returns>
System.Windows.Forms.BindingContext System.Windows.Forms.IBindableComponent.BindingContext
{
get { return BindingContext; }set { BindingContext = (BindingContext) value; }
}/// <summary>Gets the collection of data-binding objects for this <see cref=”System.Windows.Forms.IBindableComponent” />.</summary>
/// <returns>The <see cref=”System.Windows.Forms.ControlBindingsCollection” /> for this <see cref=”System.Windows.Forms.IBindableComponent” />.</returns>
System.Windows.Forms.ControlBindingsCollection System.Windows.Forms.IBindableComponent.DataBindings
{
get { return DataBindings; }
}*/#endregion
}
}
So your suggestion is all right, provided it makes the declaration easier.
Hi Felix,
We can’t add grouping of list items at the moment. The ListView in item view uses virtual rendering (only the visible portion of the items is rendered) and virtual scrolling since it’s designed for large data sets, which makes it hard to add grouping. It is possible, but not on the immediate list.
Best,
Luca
Hi,
I am trying to convert an application from VWG and one of the features I (and end-uses) need is grouping of items in ListView.
So, is there any plan to implement this feature ? and the schedule ?
— If yes, will the title of the group clickable ? Have a [ + ] or [ – ] icon, or otherwise allow to expand / collapse the group ?
Is there any sample to do that on server side, as mentioned above ?
Without this, I am hardly to make the conversion and/or end-users will most likely reject my idea of creating a new version (by WiseJ), that have less functions than the current production version (by VWG).
Thanks a lot.
Regards,
Felix CHAN
Yes, you can add a ShowPopup method that takes in a DataGridColumn component:
public class UserPopupEx : UserPopup
{
public void ShowPopup(DataGridViewColumn column)
{
Show();
CreateControl();
Eval(String.Format("this.showPopup(Wisej.Core.getComponent('{0}').getHeaderWidget())", ((Wisej.Core.IWisejComponent)column).Id));
}
}
Short explanation of the Eval line:
“this.showPopup” invokes the showPopup method on the client which takes in a widget as a parameter.
“Wisej.Core.getComponent(‘{0}’)” retrieves the component that corresponds to the specified ID. In this case, the DataGridViewColumn component.
“.getHeaderWidget()” returns the widget for the column header, associated with the DataGridColumn component.
Hi Tiago,
Thanks. The null reference is caused by a fix we added to the dev build to overcome a shortcoming of the winforms binding where controls that are not made visible at least once don’t bind. The fix of course didn’t take in consideration binding of non Control components. Will be fixed in the release.
For the IBindableComponent the problem is that it extends the WinForms.IBindableComponent – the data binding in Wisej is extended from the winforms data binding. The properties are shadowed but we didn’t consider custom implementations. The easiest way to simplify this is to let the interface only require the winforms-declared properties. This way you’d have to declare the two properties only once in custom IBindableComponent implementations.
The Wisej components and controls already provide the Wisej equivalent properties.
Let me know you thoughts on this.
Best,
Luca
Hi,
thanks for your report. I have tried and it appears that for application and desktop the favicon.ico is missing while Page and user control work fine.
I have logged issue WJ-8365 for it.
Is it the same problem that you are observing ?
Best regards
Frank
You can assign ContextMenu to the desktop and add the window-layout options. The context menu shows up also when right clicking on the task bar.
To iterate all the windows, use: foreach (Form f in Application.OpenForms). You can query and change the Location, Size, WindowState.
/Luca
Correct, we didn’t implement it but it’s on the todo list. I’ll contact you directly about using your binding code, as we did for the BindingSource.RefreshValueOnChange property.
Best,
Luca
The MainMenu doesn’t take space from the client area, participates in the Mdi merged menu system, doesn’t scroll with the client area content.
The MenuBar is simply a panel that contains a menu and can be used like any other control. The default is DockStyle.None because it can be used like a normal control anywhere in the container.
Best,
Luca
Control.Update() is used to mark the control as “dirty”. Controls in the “dirty” list are included in the response stream back to the client. You would use it if you add a property or a method to a control subclass and you want Wisej to update the widget on the client when the property is changed or the method called.
Application.Update() pushes all pending updates (dirty controls) to the client without waiting for the response to finish. When you have code in a thread that was not initiated by a client request (out-of-bound) you can use Application.Update() to push the updates to the client.
You can also use Application.Update() at any time while processing a normal request (i.e. a click) to update the client. The parameter is used only to retrieve the context, it doesn’t matter if you use a form or a control, everything that is pending at that point is pushed to the client.
Application.StartTask() is the same as Task.Run() but it restores the context before running the action.
Application.Update(ctrl, ()=>{…}) executes the action and calls Application.Update(). The code in the action block is called after the context has been restored, so you will find the session variables, browser info, cookies, etc.
HTH
/Luca
Wait for example of the Wisej-Responsive-Features too.
Sample attached.
Hi Frank,
I’ll send a (very) small sample, that will include:
Hi Tiago,
I tried to reproduce but could not.
Can you please describe the exact steps needed and tell me the code that you are trying to add by hand ?
Thanks in advance !
Best regards
Frank
Hi Riccardo,
thanks for your interest in Wisej. I have send the download link to your mail address.
Best regards
Frank
Hi Felix,
renewing trial licenses is not possible automatically. I have extended your trial period until August 31st.
Best regards
Frank
Or like when would I want to do this.
ctrl.Text = “Test”;
Application.Update(ctrl);
vs
Application.Update(ctrl, () =>
{
ctrl.Text = “Test”;
};
Yes! That’s what I needed. Excellent.
Basically, I want to use it to lauch another WiseJ program, like:
Application.Navigate(“http://” + servername + “/EPVReportViewer?report=” + reportdescriptor), “_blank”);
And then in the other app, use Applicaton.QueryString to get the “report” parameter. It would be analogous to running another app on the command line and passing it an argument.
Of course, I’ll have to implement some security, but otherwise, does this sound like a feasible approach?
I think it also might because the controls as nested down a few layers of Application.StartTask
Hi Edmond,
this seems to be a common problem in Visual Studio.
You can try following the tips here: https://wisej.com/support/question/vs2015-toolbox-wisej-icons-issue
Best regards
Frank
