Silverlight3: DataGrid vertical scrollbar missing when binding to PagedCollectionView - silverlight-3.0

I have a Silverlight DataGrid and I have set the ItemsSource to an instance of PagedCollectionView (I'm wanting to paginate my data with DataPagers).
I've noticed that the vertical scrollbar disappears when using the PagedCollectionView - which is a problem for me because I have the DataGrid nested inside of a Grid in which the RowDefinition.Height is set to Auto (I want my DataGrid to be as big as possible). Now the DataGrid extends beyond the window. I still don't see the Scrollbar when I set VerticalScrollBarVisibility="Visible" on my DataGrid - just a gray strip where it should be.
Does anyone know how I can use PagedCollectionView without having to explicitly specify the height of the DataGrid?
EDIT:
Woops - this was my fault. I can't remember what I did wrong (I figured out my problem a week or two ago), but it had something to do with me not paying attention to the surrounding layout.
Thanks,
-Charles

This is nearly always related to the container of the grid rather than the grid itself. A real pain. There are lots of good references for understanding and refreshing your knowledge on the layout system:
http://www.liquidjelly.co.uk/supersearch/?query=silverlight+layout
http://msdn.microsoft.com/en-us/library/cc645025(VS.95).aspx
http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-2-using-layout-management.aspx
http://www.nikhilk.net/Silverlight-Layout-Panels-1.aspx

Related

Get items visible in viewport of Grid in Vaadin 8 & 10

The Grid widget in Vaadin 8 & 10 offers a method to get a Set of the currently selected items: Grid::getSelectedItems.
In a similar vein, I would like to get a collection of the items that are currently visible to the user in the Grid. Say my Grid widget holds 10 items, but only 5 are viewable because the Grid widget is too short to display them all. I want to know which of the five can be seen by the user.
This is not trivial task, I have something similar, but not exactly this case before. First of all, I would I would create custom Layout component, e.g. by extending CssLayout in similar fashion as has been discussed here ( How to make UI receive scroll events ) in addition to reporting scroll events I would report the position of the layout on the viewport (see http://www.gwtproject.org/javadoc/latest/com/google/gwt/dom/client/Element.html ). Yes GWT and client side development is required.
I would use this layout as wrapper for the Grid, i.e. Grid would be in the layout. You could extend the Grid component as well. But I think doing the layout wrapper gives you nice tool that you can use with other components as well for which you need to determine, whether they are actually visible or not.
This way I can then calculate which portion of the layout is in the viewport. As you see, there are number of cases here, e.g. only bottom of the Grid or top of the Grid is visible. Then I need to know row-height, header height, etc. That enables me to calculate how many rows there are visible. I hope you get the idea. The outcome for the generic case will be rather lengthy piece of code when all possibilities are enumerated. This calculation you can do on server side.

How to add a horizontal scrollbar to ListBox in Domino Designer

I have a form in my hands with listbox on it. There was a demand to display horizontal scrollbar for this listbox since users are unable to fully read text in the right column.
Is there any way to do so?
how does it looks
desing of subform
Try to get rid off Layout and use table instead.
It seems to be limitation of layouts. It works if you do not use Layouts.
Here is how my subform looks like:

Resizing the TMainMenu

I'm relatively new to programming and my problem is with a TMainMenu on my form.
I researched a lot (a whole lot) of sites for a solution, but haven't found any that solves this exact problem.
The main menu won't resize, not even when I change the fontsize using Screen.MenuFont.Size. I tried setting the Height property in the OnMeasureItem handler, I tried resizing the images and sub-menuitems at both design- and runtime, I even tried capturing Windows' message WMDrawItem and changing it's parameter before passing it on...
The menu items in the component are resized accordingly, but the vertical height of the menubar itself isn't. (the line seen on the picture below cutting through the icons)
Is there an easy solution to this, like setting some well hidden height property somewhere?
Or do I have to rewrite half of delphi's code to achieve my goal?
Help with code examples are appreciated. :-)
Here's an image:
I am using Delphi 7 on a Win7 machine.
The height of the menu bar is a Windows metric setting. Thus it is valid system wide - not only for your application. If at all, it can only be changed via the display settings of Windows itself.
I would recommend to use TActionMainMenuBar instead. It is much more flexible then the TMainMenu.
You can change the font of the menu bar very easy as well.

Icon in header row for column setup

I would like to add an icon to the header of my data grid as it is done in Thunderbird.
There is an icon that is above the vertical scrollbar, no matter the position of the horizontal scrollbar. This icon allows the setup of the columns.
In Delphi there a lot of different grid components, that allow customizations and adding icons to there cells / header cells. But I could not find any component that has an area above the vertical scrollbar that is fixed, which when clicked allows some action. I could even use the VirtualTreeView component to emulate the grid, if it turns out to be easier to customize that component.
I am looking for some guidance on what need to be done to get that functionality.
Thanks,
Thomas
VirtualTreeView in Listbox mode would be nice, because of it's speed, great documentation and ease use in MVC-like patterns. Delphi tempts to store data in the visual components themselves, which letter causes troubles. While VTW allwos the same, it also allows to acutally separate data from GUI, and i like it.
But i am surprised by your claim "which when clicked allows some action.".
Even most basic components allow it:
http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.Grids.TCustomGrid.OnFixedCellClick
So could you make more detaiils, why you cannot use standard components ? with screenshot and editors, how u want it rendered, where you want to click and what kind of action should happen ?

DevExpress MVC controls

I cannot seem to align the DevExpress controls in the Razor view. No matter what div and span combination I use, whenever I use #Html.DevExpress().TextBox the next controls always goes below. I want to display several labels and text boxes horizontally, one next to each other.
Thanks.
Use recommendations from the Possible ways of arranging DevExpress controls within a page KB Article to resolve this issue.

Resources