ASP.NET Wizard's sidebar shrink when step panel too wide - asp.net

I'm using ASP.NET Wizard control to display a wizard with a Gridview displaying the contents of each step.
In the Gridview, there are several columns using Textboxes to display the content. When the content in the Textbox get longer, the step panel gets wider and makes the Sidebar shrink.
I've set the Sidebar (SideBarStyle-Width) and the step panel (StepStyle-Width) to use fixed width (in percentage) but the Sidebar keeps being shrunk.
I also got the width of columns (ControlStyle-Width, ItemStyle-Width) in the Gridview fixed in percentage, but that doesn't work either.
The only thing that works is to fix width of columns in the Gridview with a specific value in px, but I must keep these columns to dynamically resize for different resolutions.
Is there any way to keep the Sidebar untouched when the conten size changes?

I had the same problem, but with the following properties now it's working fine. Be sure to set AutoPostBackOnSelect="true".
Here's a sample of my grid header:
<ComponentArt:Grid ID="grdProducts" runat="server" AllowMultipleSelect="false" AllowColumnResizing="false" RunningMode="Client" AutoPostBackOnSelect="True" PageSize="10" PagerStyle="Slider">

Related

Appmaker panel & canvas height

I have a long form in a panel with lots of controls, however the Canvas/panel editor has a limited height of about 1000px and refuses to scroll to allow adding more controls.
I am able to make the panel 2000px and enable overflow to get the panel itself to scroll once the app is deployed, but how do I manage to drag/drop new controls/widgets?
TIA
At the bottom of the canvas is a round control which allows it to be extended beyond the default and therefore allows long controls.
A page's main panel should have a dimension property in the property editor, that specifies height and width. I'm able to set it to much larger values (e.g. 5000 pixels).
Once the main panel is large enough, you should be able to scroll down in it and drop new widgets where you need them to be.
It's also easy to accidentially drop in new panels and then stuff new widgets into the wrong panel, so make sure the panel structure is really what you believe it is (e.g. via the structure editor).

How to span the single column in an ASP.NET Gridview HORIZONTALLY

i have a Gridview with a single column which is a template field with an image and a label.
By default, the gridview expands vertically according to the items in the datasource.
But in my case most of the screen space is left unused and the page becomes extremely long.
So it'd be great if the one and only template field automatically becomes a new column (starts again from the top next to it's initial position after a fixed height) or SPANS HORIZONTALLY, not vertically...
i've done some searching and still can't find a solution for this..
any help would be great..!
i took 2 screenshots for a better explanation but the site won't allow me to post images yet :/
I think you are looking for the DataList control. Namely, the RepeatColumns property.

Issues with ASP>NET devexpress grid height

I am using a devexpress gridview with editform template. My issue is I have many rows within a grid, so when I edit rows at the bottom of a page, the edit form goes below the screen and I have to scroll down to see the whole edit form. Is there a way to set this grid to auto height so I dont have to scroll down. Also the vertical scroll bar is always displayed even if I make it false.
You can use PopUpEditForm So That You Dont have To ScrollDown On The Screen And It appears in the middle of the screen itself.
You can use the following settings for the PopupEditForm for your grid
<SettingsEditing EditFormColumnCount="2" Mode="PopupEditForm" PopupEditFormWidth="800px"
PopupEditFormHeight="320px" PopupEditFormVerticalAlign="Below" PopupEditFormHorizontalAlign="Center"
PopupEditFormAllowResize="false" />
PopupEditFormWidth,PopupEditFormHeight - You can change it to any size you want so that all your controls are properly placed.

How to resize DevExpress controls

I have a DevExpress LayoutControl set inside a WinForms Form. I would like the LayoutControl to resize horizontally when the form is resized, or at least make the LayoutControl resizable by the user.
I have seen on DevExpress's page suggestions to change the SizeConstraintsType property to "default". I have also tried to anchor the control to the right and left of its parent. I have worked on increasing the MaxSize, also. Does anyone know how to do this?
I just basically want to do the equivalent to (in HTML) <table width=100%>. Does anyone know how to do this?
Thanks in advance!
The Developer's Express LayoutControl is a very nice tool, but has a couple gotchas.
The LayoutControl itself should resize just fine docked inside any container control like a form, a user control or a panel control. In many cases the layout control is one of the first things you put on your form/control because everything else goes inside it to be "layedout". So you should set the "Dock" property of the layout control to "Fill" or to the desired edge of the form/control you want it to dock to.
The "gotcha" here is that layout control's internal logic may limit its external dimensions or any internal item if it is capable of doing so and the layout items want to be a particular size. This is actually simpler than it sounds.
For example lets say you have a label control inside your layout control. A label control by default will size itself to fit the width of its text. In turn the layout control will try to accommodate the label's desired size by shrinking/growing the size of the layout item. So this one label control could be messing with your layout controls resizing. I chose label as the example because it is the most common control to mess up your layout design.
The way I fix this is to change the label's "AutoSizeMode" property to "vertical" (if you want text wrapping) or "none" (if you want to force it be the size the layout control wants it to be). This free up the layout control to make the width decisions.
Also if you are allowing the layout control to be resized by the end user (say with DevExpress' SplitterControl) the layout will again try to become its optimal size and not allow the SplitterControl to move away from this optimal size if the other controls are more easily resized (like a grid, tree, list, etc...). In this case adding an "EmptySpaceItem" to the layout control will allow it to fill any empty space when being resized. To add an EmptySpaceItem to your layout, right click the layout control in the Visual Studio designer and select "Customize Layout". The customize dialog will have a list of items you can drag onto the layout control including the EmptySpaceItem.

Discovering row height of autosized GridView row in ASP.NET

I have a number of GridView controls that I need to position side-by-side on a page. For example a GridView containing a list of items in a shopping basket, and a number of GridViews to the side showing pricing from a number of suppliers.
The columns are fixed width in the first GridView - meaning that the row height is variable depending on the amount of text.
So, the question is this - is there any way to discover the individual row heights of the first data-bound GridView such that I can alter the other GridViews to correctly align?
The Row.Height property of the grid after databinding is empty as the height has not been explicity set.
thanks!
I don't know of any way to do this in .Net, you can use javascript, maybe set a .Net hidden field on load if you need it in code behind :
var h = document.getElementsByTagName('td')[0].offsetHeight;
Keep in mind this height will also include any cell padding or spacing you have set. Also, this assumes you're not explicitly setting the height in CSS which based on your question I assume you are not.

Resources