Hi,
I'm using a UltraGrid only one row bound in it. The current Band has UseRowLayout = true. In the current layout I can arrange each column one bellow the other. The issue is, there is no vertical scrollbar, when the height of the current row exceeds the height of the visible area of the grid.
Interesting is the fact, when I bound 2 row the vertical scrollbar works properly, is visible or hidden depending by the height of the rows.
Thank you,
razvann
The only thing you can do is ensure that your grid is large enough to display a single row - or give the user the ability to resize the grid so that they can make it big enough.
I suppose another option would be to put the grid inside a scrollable control like a panel and then make the grid big enough to fit the row. Then the user could scroll the panel so they can see the other parts of the grid. This is not a great solution, though, because scrollable panels do some strange things with scrolling - they tend to scroll child controls into view automatically, so if your grid is editable, this could results in some weird behavior.
Of course, a third option is, you could break up your grid into multiple (smaller) rows.
Hi Mike. I believe I am facing a similar issue as the original post. See the attached image. I have a grid that has UseRowLayout=true where the columns are arranged vertically. The height of my stacked columns is greater than the size of the container that the grid is in. I would expect the grid to scroll vertically allowing my users to see the fully details of the row. I understand from your previous reply that the out of the box behavior of the grid will not support this. Do you have any recommendations on how to handle vertical scrolling of the grid in this case?
The vertical scrolling in the grid is row-based. It scrolls one row at a time. You cannot scroll part of a row, so there's no way to do what you are trying to do here.
it seems the above behavior is the same also for regular UltraGrid, without using a RowLayout, So I wrote a simple test method which creates a newly UltraGrid and bind only one row. There is no vertical scrollbar when resizing the grid to hide some area of the bound row.
DataTable table = new DataTable();table.Columns.Add(new DataColumn("Name", typeof(String)));table.Columns.Add(new DataColumn("Value", typeof(int)));
for (int i = 0; i < 1; i++){ DataRow row = table.NewRow();
row["Name"] = "Name" + i.ToString(); row["Value"] = i; table.Rows.Add(row);}
UltraGrid mPrintGrid = new UltraGrid(); mPrintGrid.Parent = new Form();mPrintGrid.DataSource = table;
mPrintGrid.Dock = DockStyle.Fill;this.Controls.Add(mPrintGrid);