Hi there,
I'm sorry if this is a question that's been already asked, but I've done my googling and looking through documentations, and nowhere does it seem to have information about what I'm trying to do.
I have created a UltraDataSource with three bands to represent, say, memory allocation for a computer depending on operation. So, band 0 will have information about the computer with two columns, "Computer Name" and "Total Memory". Band 1 has a single column, "Task Type", which will have information about the possible tasks that can be run on that computer, such as "Word Processing", "Developing", and "Gaming". Finally Band 2 contains information about what percent of the memory will be allocated to each task, such as "Graphics Processing", "Paging". In fact, I've attached a zip file containing the data I've entered called "DataExample.jpg"
There are two things I'd like to achieve. First, I'd like to display this data in an UltraGrid in what I think would be a card view, grouping by the columns in Band 0 and Band 1. In the attached zip file is a screenshot of what I envision doing that I created with excel. The file name is "What I want to do.jpg"
So, is there a way to do this with an ultragrid? Is the Multi-band Ultradatasource I have the correct approach to get this done? Thanks for your help in advance.
On other tip... There's a method on the cell.. I forget the exact names right now, but it's something like GetMergedCells that will return an array of cells that are merged with that cell. So that might help you identify where to break.
Ok, I'll give it a shot. Thanks Mike!
Well, that's a little bit tricky, but you could do it using the RowSpacingBefore or RowSpacingAfter property on the row. You would have to loop through the rows and find the ones where you want a break and then set the spacing. This probably won't be terribly efficient if you have a lot of rows, but if you are only showing a few hundred rows, it should be feasible.
Thanks Mike,
I thought about merging cells as well, but the only problem with that was that I couldn't figure out a way to put a split between records that have been merged. Is there a way to either put a small space or a thick line after the records where the Computer Names were merged?
Hi,
Yes, you can do this with the grid. But I don't think you will want to use CardView, grouping, or a hierarchical (multi-band) data source.
To me, the image you have here looks like a single, flat table where you have turned on AllowCellMerging on the grid. CellMerging will make the grid merge cells in the same column that have the same value. So you would have a single tables with 6 columns and 6 rows. The first four rows of data all happen to have the same value for the first column (Computer Name) and so those cells would be merged.