Hi,
I would like to make a table to display data in, with headers along both the X and Y axes, instead of just the X axis like a typical ultragrid. The values in the cells would just be boolean - matching up certain X and Y values together. (The X's in the cells would represent True, empty cells are False)
Here's an example:
Is this possible to do with the ultragrid?
It could potentially work for me to use the row selectors for my Y values if I can write my own text in them.
I also had thought about turning off the row selectors, and just using the first column in my grid for the Y values (and making it so selecting a cell in that column would select the whole row).
Both of these seem like hacks to me, and I'm afraid they'd just lead to more trouble than they are really worth.
Does anyone know if there's a way to set up the grid in this manner? Does anyone know of another control that would be better suited for this?
Thanks!
There are no built-in row headers in the grid. Either of the solutions you suggest here seem perfectly reasonable to me, though.
Personally, I would probably go with a column, rather than try to use the RowSelectors. Using the RowSelectors is possible, but it won't be able to do some thing that a regular column can do like sorting or auto-sizing.
I started making a custom control that implemant that, but I have some problems.
The purpose is to show an m:n relationship.
For example:
My idea is:
One problem I have before I can check my code is how do I know when data binding complete. MS grid has an event for that and I could use one if UltraGrid had any. I can use the InitializeRow but it fires for each row and I want to add the columns only once, and it fires before I set my added properties.
I attached the sample. It's quite messy and only the first draft and it works with Linq2Sql.
You can change it to fit your scenario or any scenario.