Thanks Dmitry. It would speed up our investigation if you could send us the code. Either post it here or send it to frankATiceteagroup.com Regards, Frank
Here are screenshots of code that is responsible for bar chart drawing and a screenshot of a bar chart as a result.
Hello Luca,
thank you very much for taking the time to analyse the problem and for providing a solution.
The reportviewer is now working perfectly again.
I am planning to go for separate sub-domain for each client like tenant1.coulddomain.com, tenant2.clouddomain.com etc. Can some body share sample code to achieve this.
Just looked at your sample app. The problem is that you are saving the WrappedControl reference which is invalid right after the first cycle.
Then in OpenReport() you call CreateHostedControl() which creates an instance of the ASP.NET control that is not related to the request.
Do this:
Remember NOT to save this.WrappedControl, and that you can affect the ASP.NET control only when processing the page events exactly like in an ASP.NET page.
Basically when processing Wisej events is like if in ASP.NET you started a parallel thread and tried to change the ASP.NET control from an independent thread: ASP.NET simply cannot handle it.
Source code for the AspNetWrapper is here.
A complex example is here.
The issue is most likely the ASP.NET page cycle. Remember that ASP.NET controls on the server side do not exist outside of the request/response cycle. The instances are all destroyed and recreated from scratch on every request. If you save a reference to ASP.NET control it simply won’t work.
If you are changing any property of the ASP.NET control while processing a Wisej event it will also not work because the ASP.NET control either doesn’t exist or the instance is invalid. You have to save the values in the wrapper control and then issue an update which will cause the ASP.NET page to reload and fire all the page cycle events (Init, Load, etc) and it’s only in those events that you can interact with the ASP.NET control and update its properties using the values you cached in your wrapper.
This is why it’s hard to write real time web apps with ASP.NET or any page/html/request based web framework.
BTW, The UpdatePanel in ASP.NET is also a full page cycle request, parsing, etc.
The Application.Browser.ScreenSize is the device screen size while the Application.Browser.Size is the size of the browser. If you switch device in emulation mode you need to hit refresh since there is no event in the browser when the device emulation changes.
With Wisej 2 you can also set the value true|false using the responsive profile selector in the designer.
AFAIK there is no way to retrieve a user’s cell phone number from a web app like WiseJ without them entering it first. You could store the number in a database, but if there is a possibility of them using 2 different phones to access, it might make more sense to store the phone number in a cookie. That way it is stored on the device, and each device can have a unique number stored.
Hi Dmitry,
is your DataGridView data bound ?
You may try setting CurrentCell of the DGV to null after binding is complete.
Hope that helps.
Best regards
Frank
We use option #3 and have a website that the users login to then the user has permissions to specific companies and roles within that company. If the user has multiple companies then a drop down is shown at the top allowing the user to switch to another company. What ever the user has last chosen becomes there default company each time they login until they change it again.
Works very well for us.
Tim
Hello again,
please let me know if you need further details to reproduce the problem,
or if i am able to clarify some points.
Best regards,
Florian Bogner
Possible but you’d have to replace all the drawing code with a corresponding javascript widget. You can preserve the logic and properties.
You cannot run a winforms control in the browser. All Wisej controls are written in C# on the server side for the logic and created in the browser as pure javascript widgets.
Jorge,
Actually it turned out that there is a bug in the color editor,
now logged as #1923 and will be fixed in the next release.
Best regards
Frank
Ok Got it, but it’s a bit odd, since in the properties window below, it show’s the info yellow.
Hi Jorge,
it´s not a bug. Info is the name for a color that is defined in the theme you selected.
You can change it in a custom theme or override the setting with a theme mixin.
Best regards
Frank
You can implement multi tenancy in many different ways:
Options 1 and 2 don’t require any change in your application and any project would work. You can use any of our samples in github or any of your Wisej apps.
Options 3 has to be implemented in your application. There is no sample project that would fit a custom architecture. It depends on how you provision your database and it depends on your data structure, etc.
Any concept that applies with any .NET (web or not web ) app works when using Wisej.
My company uses #2 giving each tenant a dedicated app domain and IIS site.
Feel free to ask any specific questions. We append the tenant to the domain like customername.cloudxxxxxxx.com and then use Application.RequestUri to get customername.
Hi Adrian,
do you use Wisej 1.5. or Wisej 2.0 ?
It seems there is a mismatch in version ?
Can you please attach the sample you have tried ?
Or your app so I can check ?
Thanks in advance,
Frank
Hi Luca,
Thanks for the answer, i’ll wait for then new release with the MaskedTextBox.
Best regards,
Alex.
In the sample you are starting 3 threads that populate the datagrid one after the other causing a full refresh each time. They are synchronized by locking the grid object, which is ok. The problem is that you don’t change the data source and internally the BindingContext preserves the position of the current record and also that when on the web the events are all asynchronous.
This is what’s happening:
The solution is to adding a new data source object either by creating a new List<> or a new BindingSource and to populate it when it’s not assigned, otherwise Wisej will update the grid while it’s bound to the datasource. Try this change:
private void SetDataSource(DataGridView grid, List<ViewPratiche> dataSource)
{
lock (grid)
{
grid.BeginUpdate();
try
{
grid.DataSource = null;
LoadDataSource(dataSource, 10000);
grid.DataSource = new BindingSource(dataSource, "");
}
finally
{
grid.EndUpdate();
}
}
}
And don’t call LoadDataSource on the data source while it’s bound.
Let me know.
