HI,
I have a grid which has only one row but around 25 columns. So,i want to romove horizontal scrolling and get the columns which are not visible in the space provided for the grid to be shown below the previous columns. Say something like columns 8-15 below columns 0-7 and ofcourse the corresponding row. Is ther any way to do it in the Grid?
Thank you
Navi
Hi Navi,
There are two ways you can do this. One way would be to use a RowLayout. This is easy if you have your grid bound to a data source at design-time in which case you can set up your columns right in the grid designer. It's a bit tricky to do at run-time unless you are familiar with GridBagLayouts.
The second way is using Groups and Levels. You simply add one or more Groups to the band, assign each column to a group, and then set the LevelCount on the band and set the Level of each column.
Hi,
Thanks for the reply and sorry for the dealy, i was stuck in some other work. So, i didnt try the way as i am binding datasource dynamically. In case of adding groups, the columns are coming below each other but the rows are not being shown. Its like a grid of column names. Any idea why?
Thanks
If there are no rows in the grid, the only explaination is that there are no rows in the data source. Or all the grid rows are hidden for some reason. Perhap syou are applying filter.
Before adding the groups its working fine. All i am doing is add groups, add the columsn to the groups and set the levels. Thats all, i dont know where its going wrong.
I am not setting any filters but i am setting cell editors using EmbeddableEditorBase and ValueList. Does it make any difference?
No, I don't see how editors could matter. I'm afraid I am at a loss to explain this. If you are setting the groups and the columns, then I see no reason why the rows would not show up.
Can you duplicate this in a small sample project?
Sorry, I should have been more specific.In order to get the headers to appear in the row along wih the cells, you have to set the RowLayoutLabelStyle property on the band to WithCellData.
Hi
Can you explain me in a bit more detail how to use RowLayouts for my purpose. I've used RowLayoutColumnInfo but its still the same. A grid of columns followed by a grid of cells. I want the cells to be shown along with the corresponding columns.
You can't do that with Groups and Levels, but you can do it with RowLayouts. :)
The problem was with threading, its been resolved. I am running it on a separate thread. Anyway, this time, the columns are coming just like before and the rows are comg below all the columns. Its like an 'm by n' grid of columns below which there is 'm by n' grid of cells. Isnt there anyway for the rows to be shown along with columns?