Using the UltraWinGrid how do I merge columns. For example if I have four columns in my grid and I want to merge columns 2 and 3 how would I do this? I cannot seem to find a clear answer on the forums or documentation.
Thank you,
Glenn
Hi Sandeep,
The grid can merge cells with the same values across rows, but it cannot do it across columns - at least not without using a messy CreationFilter.
It doesn't sound like you need cell merging. Do you really need to have different merging of cells in each row of data? And why would you need to merge across rows in the same column if you are showing an image? If you just want to display an image in a row and you want that image to span multiple columns or levels within that row, then you could just use a RowLayout.
Maybe I'm wrong. It might help if you could post a screen shot of what you are trying to do.
Hi Mike,
The ultrawingrid I am using has an image (such as kidney/prostate etc...) as background and we are using this for annotation purpose in a electronic health record application. My request is I want to merge multiple cells in same column and multiple cells in same row of ultrawingrid. This is similar to excel cell merge/unmerge functionality.
The merged cells needs to be used for identification and annotation for specific diagnosis.
Thanks
Sandeep Shyam
Hi,
The sample does not have Col0 and Col1 merged on my machine. But anyway, the merging that is done here is done on the UIElement level, so the grid has no way of knowing that the cells are merged. So if you are in a cell in Col0 and press Tab focus will move to Col1, which is essentially nowhere.
What I would do is handle the BeforePerformAction event of the grid and watch for an action of NextCell or NextCellByTab (or both). Then you can evaluate which cell you are on and active the appropriate next cell based on the merging you are doing. You also need to set e.Cancel to true to prevent the default action processing.
Hello,
The sample works great.
There is one issue and I wanted to know if there is a built in way to handle it.
When you launch the sample, the first row has Col0 and Col1 merged.
The focus is on the merged cell. I need to hit {TAB} TWICE to get to Col2.
Is there some property of the Grid that can handle this issue?
Thanks!
I am waiting for your reply.
Regards
Nitin Gupta
for explanation of requirment.
thanks