there are a number of little tweaks I would like to make to how a WinGrid looks, but I cannot figure out how to do them. Here is the screen shot of what I have so far:
Here is what I would like to change:
Band[0]
Band [1]
Hello,
This little boxes are the RowSelectors you can dispatch them with this property: ultraGrid1.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False;
In order to make Name expand to the full width you can set this: ultraGrid1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns; After which you can set the MIn/MaxWidth of # in order to prevent it from resizing
You can eliminate the space between the bands with: ultraGrid1.DisplayLayout.InterBandSpacing = 0;
There isn't a property that disables the whole band but one way to do this is like so:
private void ultraGrid1_AfterCellActivate(object sender, EventArgs e){ if (ultraGrid1.ActiveCell.Band.Index == 1) { //ultraGrid1.PerformAction(UltraGridAction.PrevCell); //ultraGrid1.ActiveCell = null; } }
private void ultraGrid1_AfterRowActivate(object sender, EventArgs e){ if (ultraGrid1.ActiveRow.Band.Index == 1) { //ultraGrid1.PerformAction(UltraGridAction.PrevRow); //ultraGrid1.ActiveRow = null; }}
Hope this helps.
Sincerely,
Petar Monov
Developer Support Engineer,
Infragistics, Inc
(Verify answer if satisfied)
Peter,
I assume that one must remove the comments from the two events :) If I understand the code snipets correctly, you are simply making the last row that was selected, selected again, and than removing the selection. Is there an issue of nothing was selected to begine with?
With respect to the ultraGrid1.DisplayLayout.InterBandSpacing = 0; It does what I want, except the black line at the top of the first row in a band[1] set and at the bottom of the same set doubles up the thickness. Is there any way to resolve that but still keep the lines when there is no band[0] under band[1]?
Sam