Hi Rudy,
I have a data binding sample using EF6 that is ready but not piblished. I will send it on Monday when I’m back in the office.
I general you can bind a datagridview using EF as you would do in a winforms app. When you edit a cell, the data is automatically updated in the corresponding EF item. When you click save you simply update and commit the EF database context.
Columns can be hidden at design time or runtime.
Best,
Luca
I want to a page show on panel , i add small sample
Thanks
Hi Birol,
I’m not sure I understand the issue. Can you please send me a small sample app that shows what you need to do?
You can attach it to an answer or email it to support@wisej.com.
In general a wisej page is shown automatically when you call page1.Show(). Or you can assign it to Application.MainPage = page1. However, I don’t think this is what you are looking for.
Best,
Luca
Have you any solution this topic ?
Hi Luca,
Amazing! It works perfectly! For the record, I put it in a form I create at runtime, like this. Best, Alex.
var uc = new MyUserControl();
uc.Dock = DockStyle.Fill;
var f = new Form();
f.Controls.Add(uc);
f.ControlBox = false;
f.StartPosition = FormStartPosition.CenterScreen;
f.Load += (s, e) => { ((Form)s).Eval(“this.setAllowMove(false);this.__moveHandle = null;this.setAllowMove(true);”); };
f.ShowDialog();
Hi Alex,
Sorry for the delay, I could only try this today.
The user control is docked to fill so it’s normal that after moving it it snaps back into place. If you want a floating window that can be moved around by grabbing it anywhere you can add the following call in Window.OnLoad():
this.Eval("this.setAllowMove(false);this.__moveHandle = null;this.setAllowMove(true);");
The MMovable mixin allows only one widget to be selected as the movable handle. The qx.ui.window.Window class which is the base for wisej.web.Form, always registers the caption as the movable handle. The AllowMove property added by Wisej can only enable or disable the movable handle but cannot change it. The line above, first disables it, then clears the reference to the single movable handle, the re-register the movable handle but this time it will be the entire window.
I tried it and it works well. You can click and drag anywhere, even inside another widget if that widgets doesn’t handle the pointer.
HTH
Best,
Luca
How can i show pages on usercontrol? I have 80 page. Must i add userconrol for each page?
Hi Luca,
Thought you were on holidays! 😛
I have a popup form which contains a UserControl with its Dock property set to Fill. So, in the absence of the Form’s ControlBox, all the Form surface is covered by the UserControl.
I had set the Movable property of the form, but since its whole surface is covered by the contained UserControl, this does not fire. If I set the Movable on the UserControl, then this moves withing the form borders (and by the way, when I stop dragging, the UserControl moves back to its initial position), the form remaining at the same location. In such a scenario, where the whole form surface is covered by the UserControl it contains, we need somehow to propagate the moving of the content to the container. Maybe the easiest would be to keep the ControlBox = true, but for small popup windows it looks ugly …
Best,
Alex
That’s possible. I will post the javascript code to enable that later – I need to try it.
Moving widgets is managed by a mixin class called MMovable that hooks pointer events. For windows that happens only on the caption but it can be changed to work on the content pane. Try to set Movable=true on a button for example.
Best,
Luca
Hi,
Instead of using a Page, use a UserControl. Then you can add the UserControl to the Panel.
Best,
Alex
Hi Lukasz,
thanks for your question regarding licensing.
In our current pricing model your scenario would require 7 developer licenses plus 6 server licences for deployment at client side.
You can find the pricing details here:
https://wisej.com/support/question/licensing-model-and-costs
Hope that helps.
Best regards
Frank
Hi Alex,
I have played a bit with http://onlyoffice.org with the intention of integrating it with wisej. It’s an amazing free open source and commercial product. It seems to work better than google docs and microsoft’s online office.
I left it on the todo list for now. But it can certainly be used with wisej.
My preference would be to also integrate the server and let wisej serve the documents. But for that we will have to make some kind of OEM agreement.
To convert open office docs to pdf look for doc4j port to .NET.
HTH
Best,
Luca
Hi guys,
This is not related with the PdfViewer, but I thought it would be worth asking such a knowledgeable community! Do you happen to know of any utility that can convert Office documents (.docx, .xlsx and possibly older ones, .doc/.xls) to pdf? The utility should be installed on the server, should not need Office installed on the server and have a reasonable price… I know of various commercial products, but they are ridiculously expensive.
Alternatively, any way to show office documents without converting them and without having the user download them and open them with their own installed Office? Anybody has tried the “ASP.NET Web Forms DocuVieware Lite” which claims to be a lite/free version of the “universal” same-named (without the “Lite”) document viewer (it does not show Excel though). And, Luca, if such a WebForms control could be integrated in Wisej ?
Just looking for ideas during the summer holidays!
All the best,
Alex
Hi Luca,
The error message in JSON format is now gone.
Above code snippet works and thanks. But it presupposes the there is an existing, pre-saved pdf file. It opens the file, puts it into a memorystream then display the contents in pdfviewer.
It may no be clear of what I intend to do but I need to programmatically create a pdf file using itextsharp and memorystream and view it directly in pdfwiever without first saving it into a disk.
But anyway, I was already able to resolve it based on the above code snippet.
Thanks
Hi Cris,
The property PdfSource takes in either an external URL (the source should have CORS allowed) or a local file. The local file must be a file that can be server by the server, not a file anywhere on the disk. We should throw a clear exception when the file contains a full path. Try to place the file under the project and selected it with the file picker. It should work.
I also tried assigning the PdfStream in the form’s OnLoad event and it seems to work.
var file = new FileStream(@"C:\Users\Luca\Downloads\Wisej-Datasheet-V2.1.pdf", FileMode.Open, FileAccess.Read); var reader = new BinaryReader(file); var buffer = reader.ReadBytes((int)file.Length); var mem = new MemoryStream(buffer); this.pdfViewer1.PdfStream = mem;
The JSON you see is the description of the exception that is displayed by the pdf viewer object. It’s clearly a bug.
HTH
Best,
Luca
Hi,
I intentionally deleted the pdf file created, then tried to view the file without checking it’s existence but within a try-catch-block. See the attached image for what I got. I expected the the code in the catch block will be executed.
Thanks.
That was trash. That’s unfortunately what you get with an open forum. We delete and ban the IPs.
At one point, on another site, I had to ban entire countries.
what’s this?
nice weekend.
Yes, you are right if TextAlign is set to Underneath.
Thanks.
