Hi,
We have a grid with one string column and rest all are check box columns.
We are trying to improve the user experience by providing check boxes for selecting / deselecting all in the corresponding column / row headers.
The row header should show the string column value for that row and all other cells will display checkboxes.
selecting/ deselecting a header checkbox for a column does appropriate action for all the rows.
Similarly , selecting/deselecting a checkbox in row header will do appropriate action for all cells in that row.
Getting checkboxes in column headers is quite easy. We need to tweak with some properties of column to get that done.
I am struggling with displaying headers for row. I looked into some samples and made
I could manage the Rowselectors to display a text using DrawFilter but I feel that its not much flexible to include the checkbox in the row selector.
Later I set the style of the identifier column to Button and could display the items in the string column similar to row header.
Now I need to place a checkbox in the same cell to provide a select/deselect all option for the entire row.
I have also tried using CardView for Band but didnt find it much useful.
Can anybody guide me on how to achieve this.
Thanks,
Satish
Hi Satish,
I got a little bit lost in your description.
tsatish said:I could manage the Rowselectors to display a text using DrawFilter but I feel that its not much flexible to include the checkbox in the row selector.
I was with you up to this point.
tsatish said:Later I set the style of the identifier column to Button and could display the items in the string column similar to row header.
I'm not totally clear on what the Identifier column is. Is that the string column? If so... why would you want to set it to Button style? I thought you wanted CheckBoxes, so what does Button have to do with it? Are you trying to make it a toggle button?
The WinGrid doesn't have any built-in functionality for synchronizing the checkboxes in a row with a row header like it does for the columns. But it seems to me that the easiest thing for you to do would to use another checkbox column for this. You could add an unbound column to the grid and set it's DataType to CheckState. This would give you a three-state checkbox column and you could write code in the CellChange event so that when this checkbox is clicked, you synchronize all of the other cells in the same row.
Hi Mike,
Thanks for your reply.
Yes the identifier column is the string column I was talking about.
While exploring different ways to display row headers, I first tried tweaking row selectors using DrawFilter.
Later, as a second option I tried setting the cellStyle of the string column to button to get a row header kind of look and feel.
I will try the approach you have suggested.
Meanwhile, Can you let me know if there is any way that we can set the cellstyle to button and display a checkbox in that to achieve the same style as column header checkboxes.