Could you have a checkbox on a column header instead of a string that will be clickable? Or if this is not possible is there a way to make the column headers row to behave like a regular row? My data soiurce is a data table and I will like not to get rid of the headers but be able to show them as a regular row?
I can't recall how to remove " Drag a column header here to group by that column" from the grid. It is not the caption, is soemthing else that I can't remember.
Thanks!
mfaina said: Could you have a checkbox on a column header instead of a string that will be clickable? Or if this is not possible is there a way to make the column headers row to behave like a regular row? My data soiurce is a data table and I will like not to get rid of the headers but be able to show them as a regular row?
Column headers are not editable and the grid doesn't have any support for making them so. If you want to put checkboxes into a column header, check out this KB article: HOWTO:How do I add a CheckBox to a WinGrid column header?
mfaina said:I can't recall how to remove " Drag a column header here to group by that column" from the grid. It is not the caption, is soemthing else that I can't remember.
That's the GroupByBox. You can turn this off in a number of ways - it depends how you turned it on. You probably need to set th grid.DisplayLayout.ViewStyleBand. Or maybe grid.DisplayLayout.GroupByBox.Hidden.
Thanks Mike!! I created the filte, it works but.. I am creating group headers in OnInitializeLayout and it seems that the filer is not working. Where is the best palce to call the filter so it will be before OnInitializeLayout thus it can deal with adding the checkbox to the headers before I am creating the group headers.
Mike, I solved my problem - just filtering out the group headers for processing in the filter will do it.
Intermidiate CheckState is presented with a fill-in color box, nothing to do with the color.
The only thing that I ca't change is the color of the check button on the header it fills/draws witrh a color, all the other buttons on the column are not. I tried to set DrawBackColor to false, it doesn't work.
CheckBoxUIElement aCheckBoxUIElement = (CheckBoxUIElement) parent.GetDescendant(typeof(CheckBoxUIElement)); if (aCheckBoxUIElement == null) { //Create a New CheckBoxUIElement aCheckBoxUIElement = new CheckBoxUIElement(parent); } aCheckBoxUIElement.DrawsBackColor = false;