Search This Blog

Thursday, May 31, 2018

WinForms - How to manage long text in DocumentManager tabs

Please check out the Problem and Solutions sections in the T629226: WinForms - Long text is cut off in DocumentManager tabs ticket.

We are going to improve this in the upcoming v18.1+. Our designer's favorite is #2, but we cannot implement it in a minor version due to a breaking change. BTW, option #1 shown in the screenshot below also looks fine. Take note of solution #3 as well - you can customize this behavior without writing any code.


Please let me know what option you prefer or if you are handling it differently. Thanks.

BTW, have you modernized your XAF WinForms apps using SVG icons and Light Style in v18.1? Click the screenshot below to see the new look & feel. Do you like it?


Friday, May 25, 2018

Web - How to avoid issues with data-bound controls due to missing or non-unique key values

Check out the Web - How to avoid issues with data-bound controls due to missing or non-unique key values KB article to make sure that your business model is aligned with the best practices. Here is a short extract:


Symptoms
You may notice the following side-effects in a Web ListView while it may work fine in WinForms:
- A wrong DetailView may be selected when an unsaved record is clicked in ListView;
- ListView may have no selection column;
- In inline edit or batch mode, all records may become selected or editable.
These effects are especially frequent in a non-persistent class ListView or a nested ListView for an aggregated details collection with newly added or unsaved records.

Explanation
All new records added to the ListView and not yet saved to the database will be assigned with a temporary key value (e.g. -1 or an empty Guid/String value depending on your key type). In a Web application, ListView uses a business class key property to identify records, because there is no way to access real business objects from the web browser. Hence, there is a requirement that each business object must have a unique value assigned to the key property. ASPxGridView and other data-bound controls require this for the correct operation of such features like selection, filtering, sorting, grouping and the standard XAF functionality that depends on them (see also ASPxGridBase > KeyFieldName). 
If a key property is missing in a business class completely or if a key property is not initialized with a unique value immediately after the record is created, these duplicate or invalid records may lead to a data-bound control malfunction as expected.


Please inform me of your health-check results!

FreeImages.Com

Friday, May 11, 2018

Improved diagnostics for ListView errors in Server Mode

From the Core - ListView shows blank rows or freezes in certain scenarios in Server Mode ticket:


In certain scenarios, a list view with DataAccessMode set to Server may show empty rows or operate slowly. This behavior is usually caused by exceptions thrown during data loading that are handled internally. Such situations can be diagnosed using the debugger (see What to do when the grid displays blank rows in Server Mode and ASPxGridView displays empty rows when bound via Server Mode).

Starting with v18.1, we improved the XAF built-in diagnostics for errors occurring in Server Mode data sources. Now, server-side errors (intercepted via the ServerExceptionThrown event) are written to the application log. In addition, when the log level is set to 4 (Verbose), errors reported via the InconsistencyDetected event are also written to the log. While the latter event doesn't always indicate a problem, the error message may be helpful in researching the cause of performance issues.



Wednesday, May 9, 2018

Quick questions on our change log

Q1: How often do you check the "Resolved Issues", "Known Issues", "Breaking Changes" pages in our What's New documentation? For instance: "never, did not know about this page"; "every minor"; "every major"; "rarely, only when I encounter an issue"; "once 1-2 year when we upgrade"; your option.
Q2: What would you like to improve about these pages to make your work more comfortable?
Q3: Are you missing anything important from the "New Major Features" section like this for v18.1?



This post idea came after looking at the fixed XAF issues for the upcoming v17.2.8:

As you can see, titles have different formatting and it is not easy to find all issues for a certain platform or module, e.g. Mobile.

This is how a bit better formatted list looks now:

This needs a little bit more discipline from our team, but may be more helpful for our customers. I am  still hesitating because this problem may not exist for many, because Google Analytics reports low visits for these pages.

I hope you can help us see whether to focus on more important things by answering my questions above. Your other thoughts and suggestions are welcome too, as always.

See Also: General Information > Installation > Upgrade Notes

SVG images in RichTextPropertyEditor

UPDATED:
With v18.2, the ForcePngIcons option is no longer required. Use the ImageLoader.Instance.UseSvgImages property instead.
----------------------------
We've temporarily disabled SVG icons in RichTextPropertyEditor (a part of the new Office module in v18.1.3) in an XAF app until we redraw all default PNG images (by the end of 2018). Our designers aimed to avoid bad UX after mixing PNG and SVG images within one screen. For instance, the merged main and RichEditControl's menus may look inconsistent. Different images in independent UI contexts are acceptable, e.g., SVG in a separate report designer and PNG in the main form.

To force SVG images in v18.1, set the static DevExpress.ExpressApp.Office.Win.OfficeWindowsFormsModule.ForcePngIcons property to False in the Main method of the YourSolutionName.Win/Program.xx file (available in v18.1.3+).



To check our progress with regard to SVG icons support for WinForms and to help future development by answering questions from our team or sharing early feedback, please visit this knowledge base article.