When TableLayoutPanel activates scroll, FIRST row grows too big - winforms

I'm going crazy with this. I have seen many threads of people asking to solve when the last row of the TableLayoutPanel grows too big. But I have the opposite problem, when the scroll gets activated because the table has many elements (added programatically), the first row grows too big, the size of the table, and the rest of the rows look just fine. Any help would be appreciated please.
Thank you in advance!

Related

Fixed row in DevExtremeREACTIVE

Im using DevExtremeREACTIVE grid. Need to fix one row. As I understood from documentations its very easy for columns, but couldn't find anything for rows.
In the picture marked row should be fixed while user scrolling vertically.

WPF Speed Load Time of Expanding a Specific TreeView Element

I have been trying to find out specific ways of improving the load times of a treeview element that contains 1500 flat nodes. At the moment it takes over 15 seconds to expand a single node.
I have tried the suggestions regarding virtualisation but its my understanding that virtualisation basically avoids loading and rendering elements that cannot be seen. Correct?
If so, what happens when you expand an element where there are 1500 items within that single expansion, does it not then need to load those 1500 items?
It seems obviously, if I split up my TreeView so that each time 10 elements were added, it added another folder. So you couldn't view the whole treeview at once. This is NOT really an option for me.
So is there a way of possibly background loading the tree element add, so that I can display the treeview even while its loading items?
This is the only solution I can think of but I have yet to come across a way of being able to update the UI and not be blocking at the same time.
Thanks
Virtualization is the logical way to go.
Math is your friend here:
Let's, for the sake of argument, assume that 1 node takes up an insanely small 5 vertical pixels. A screen with a height of 7500 pixels would be able to show all 1500 nodes.
Cutting the number in half to 750 nodes would still require a height of 3750 pixels.
If we take a more reasonable height for one node, I think the default is 19, a decent 4K monitor would be able to show around 200 of them.
I'm currently running on a 1920x1200 monitor, with scaling at 100% (strangely called "smaller"). Explorer, with the ribbon collapsed, shows me 43 items. 2000 pixels would give me around 73 items in view. And the items in Explorer are pretty much as small as I would want them to be without going blind.
Bottom line: You're unlikely to run in to the problems with virtualization.
For anybody coming across this question. Ensure you haven't wrapped (or even have a scrollviewer) in the same grid as your treeview.
It completely disables virtualisation without warning.

Silverlight Optimization

I have an application written in Silverlight 5, which requires optimization.
Application contains a TreeView, each element of the tree contains about 25 editbox controls with background image. The tree has an average of about 50 elements, which makes ~ 1250 edit controls. The problem is that it scrolls the tree or select editboxs very very slowly, even if only 5-6 elements are visible.
I think virtualization in this case will not help because the problem is in the drawing of visible elements.
Does anyone have any idea how to optimize?
Can't post image becouse of my low score but one TreeView Item looks like:
Floor 4 (0xAA03) |EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB|EB (25)
where EB is EditBox in form of rectangle with image background and text for room number. Editboxs are created dynamic.
Thank you in advance.
Ok, it's difficult to give a qualified answer. But let's have a try. I think your statement virtualization won't help is not fully true, but it doesn't seem to be the main problem.
An educated guess is, that you're using DropShadows or OpacityMasks which are a real performance killer. If it's like that please remove them and tell me the result. Otherwise I'm running out of ideas, sorry.

RowDetailsTemplate doesn't autosize back - Silverlight DataGrid

Please look at the attached screenshots.
I'm adding a datagrid to the rowdetails area for each row in the template.
The problem I have now is that the rowdetails area sizes correctly when it gets larger, ie when more content is added.
But once you collapse those rows(and their corresponding rowdetails) and open another rowdetail that is smaller than the first one, the rowdetails container does not resize back(ie smaller) to fit the smaller content.
Please refer to the following flickr set, as I am not allowed to post images or more than one hyperlink: http://www.flickr.com/photos/47755109#N08/sets/72157623590404492/
How do I fix this issue?
Regards
Renier
I searched the net about this issue, and found only very complicated workarounds (like here).
But it is actually VERY easy to fix that issue:
<sdk:DataGrid.RowDetailsTemplate>
<DataTemplate>
<ContentControl **VerticalAlignment="Top"**
...
--> if the control inside the datatemplate has a verticalalignment of "Top" (vs. the default "Stretch") the rows shrink as expected.
Regards
Johannes
I know that this question is extremely old, but I just stumbled across it after having encountered this problem previously. It is related to other problems like http://forums.silverlight.net/p/96989/279885.aspx
Basically the root is that the DataGrid control wants to avoid having its rows jittering in size. Because of virtualization when you scroll an element off (lets presume horizontal scrolling) the element is no longer rendered. So when Silverlight tries to determine the height of a row if the largest piece of the row is off the side (and therefor virtualized) then it can't really know how tall the row should be without rendering all of the off screen content. So in this case they made a compromise, they use the height of elements that are on the screen or the current height of the row, if the current height is larger than all the elements currently on the screen. This results in the behavior you're describing.
There are a few workarounds, one described in the link above is to turn off virtualization on the DataGrid, but this can have performance impact if there is a non-trivial amount of data in the DataGrid. The other one that I used was to set the DataGrid row height to 0, force a re-render and then set the row height back to its default or auto. This way I was able to force the rows to shrink back down.
Hope that helps someone who stumbles across this problem.

Datagridview scrolling/last row problem (.Net Winforms)

I have a grid with 7 and half rows visible. I have managed to display the last row fully but the half row space after the last row does not repaint and shows whatever was there previously. Even if I drag another window over my form with the grid and then minimize it, the empty space shows content of the minimized window.
I've tried Invalidate() but no luck.
Hope you understand.
Any help appreciated.
I had this exact problem. I tried all sorts of craziness. In the end, what worked, was that I would hide / show the datagridview control after I inserted a row.
Hope this helps...

Resources