Hi all,
today I've found a small issue when using the Group By feature of UltraGrid. The default text didn't fit into the Group By box during runtime although it fitted in Designer. I've shortened it to a shorter text but this made the Group By box more narrow in the Designer thus it didn't fit either. I've event tried a smaller font but the result was the same. Imho the problem is that the width of the Group By box is calculated in the Designer but during runtime the text uses little bit more space thus not fitting into the box.
Here are 2 pictures displaying that issue:
Group By Box in the Designer
Group By Box in App
The grid is embedded in a rather simple WinForm dialog with just a UltraToolbarsManager with a Toolbar at top of the dialog. The UltraGrid control is docked to the remaining space of that dialog.
I'm running Infragistics4 v16.1 on a Windows 10 64bit machine.
Thanks,Wolfgang
Hello,
I attempted to reproduce this in a sample, but was not successful. Are you able to send a sample that we can use to debug? If you would prefer not to upload your sample to the public forum, please let me know and I will create a private case for you.
Hi Mike!
Thanks for your help. I've created a new sample project with just a simple dialog containing a Toolbars Manager and an UltraGrid inside, this works without problems. We are using AppStylist for our production application, I thought that this is maybe causing the problem so I removed the call to App Style loading but that didn't change anything. Basically our application consists of a shell which is a Windows Form looking similar to MS-Outlook by having an Explorer Bar to the left with several groups, each group then contains Tree Views to select Views that will open in the space right of the Explorer Bar. Each View is implemented as a UserControl that is dynamically loaded and shown by the main Shell. It makes no difference if the UltraGrid is in one of the View-User Controls or in a separate dialog, if the Group By Box is shown the width is too small.
I've now copied the implementation of the Shell to the Sample project, had to remove the code which is related to our business application like database connection, Active Directory connection etc. In our Business application I've also created a simple dialog with just a Toolbar Manager and a docked UltraGrid inside, copied that implementation 1:1 to the sample project. If this dialog is opened in the Business Application the Group By Box is too narrow, if I open same Dialog from the sample project it is wide enough. It seems that there is something different in our main Business Application causing a different behaviour!
Currently I'm little stuck how I could proceed to provide you with an example because our main Business Application requires a database connection and also connection to our Active Directory, also due to legal reasons we cannot provide you with that. If someone of you guys has some ideas what I can do and test this would be rather welcome, maybe then it is possible to create a sample application for you?
Thanks again and best regards,Wolfgang
Hi Wolfgang,
There's a few approaches we could take.
First, is it possible to create a copy of the business application and remove any data binding? This should address both the data connection requirement and the legal issue. If you can send that to me, we can work together on removing code from the sample until we've isolated the issue.
A second possibility is to provide us with access to a VM. This would allow you to set up all the data requirements locally on that machine and we would not need to worry about teaching me about those requirements.
If the data cannot be shared and we cannot reproduce the issue without connecting to data, would it be possible to create a dummy database that uses sample data instead of the real information?
Finally, we can have our teams work together to draw up an NDA to ensure that any information is kept confidential. Depending on the nature of the data, this may or may not be possible.
Please let me know if any of these methods work for you.
Hi Mike,
I've managed to create a sample application showing the behavior with the Group By box. When I started investigating in that issue some days ago my first thought was that it is related to App Stylist which we are using but when removing that it didn't show any difference so I kept searching. Now, some days later I found out that this seems to be the issue because if I apply the same style file to the sample application the group by box is too narrow so text gets cut off. Btw, if I remove the style file for our main Business application the group by box is shown correctly so probably I've done something wrong days before.
When looking into XML-content of the style file, searching for UltraGrid I couldn't find any occurrence at all because we don't style the UltraGrid control using the style file. I leave it up to you experts to find out :-)
I've attached a zipped version of the Sample project. There is both an UltraGrid showing when you start the application and another one if you press the 'About' button on the upper left of the application where another dialog pops up containing an Ultragrid with a different text in the Group By box that is also too shirt. If you comment out line 17 in file Program.cs (the load of style file) the content of Group By box fits.
I hope that helps identifying that issue! If you need any further assistance don't hesitate to contact me.
Regards,Wolfgang
thanks for your suggested solution. The good news are that it solves the issue with the group by box where the entire content is displayed. The bad news are that this changes also the content of the Grid as you can see in the two pictures below:
"Normal" Layout (with section in ISL)
Changed Layout (Section removed in ISL)
Since UltraGrid is used a lot in our Business Application's views and dialogs it was very convenient to set the font and size at one place in the ISL. To change that in every form where the UltraGrid is used is not an option. Maybe there is another ISL option to set the font for the Grid content area because for me it sounds little bit irritating that GridControlArea changes something in theContentarea of the Grid.
Thanks for sending your sample. I was able to identify that the issue is caused by a setting in the ISL. If you remove the following section from the ISL file, the groupby box should go back to normal:
<style role="GridControlArea"> <states> <state name="Normal" fontName="MS Reference Sans Serif" /> </states></style>
This style is defined on lines 26-30 of the ISL. I was also able to get the correct result by changing the font to something else, such as "Arial" or "MS Sans Serif," but it works to remove it entirely.
Please let me know if this solution works for you.