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]
Hi Sam,
scarleton said:Well, the control is a picker control. It is designed to allow the end user select something from Band[0], Band[1] is simply there to help them determine which Band[0] to pick.
Okay, it depends how you are doing your "selection". It sounds to me like you are only selecting a single row, which means you may be using the grid's ActiveRow rather than grid.Selected.Rows.
Controlling Selection is very easy, you just use the SelectTypeRow property on the Override. So you could set SelectTypeRow on Band 1 to None, and SelectTypeRow on Band 0 to SingleSelect.
The ActiveRow is more complex, because by default, the grid will synchronize the ActiveRow with the current row of the CurrencyManager.
So there are number of unknowns here. One thing you could do is use the Activation property on the row. You could handle the InitializeRow event, check the e.Row.Band.Index or maybe Key and disable the row if it's a row in Band 1. This would prevent the user from clicking on the row, selecting it, or editing it.
Another option you might consider is that when the user clicks on a child row, you just interpret that as selection of the parent row.
You can chose which particular borders to visualize (left , top, right, bottom) by using IUIElementDrawFilter which is kinda a complicated. I suggest setting these proerties:
ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;ultraGrid1.DisplayLayout.Override.RowAppearance.BorderColor = Color.White;ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.None;
and you'll get:
Regards Petar.
Mike Saltzman"] Your last question is a bit unclear. What exactly do you mean by "select"?
Your last question is a bit unclear. What exactly do you mean by "select"?
Well, the control is a picker control. It is designed to allow the end user select something from Band[0], Band[1] is simply there to help them determine which Band[0] to pick.
Sam
Petar Monov"]I can't actually understand which border is botherring you. Try out setting the row's Appearance.BorderColor property. If it doesnt help please send a ascrrenshot to help me understand.
My pleasure:
(I just noticed something else, the very first row of Band[0] has it's top black line cut off by the headers "Index" and "Option", too)
You can prevent the user from selecting a row in any band using something like this:
grid.DisplayLayout.Bands[0].Override.SelectTypeRow = None
But I don't think you are really talking about selection here, I think you probably mean something more, like you don't want the user to Activate the row, or maybe you don't want the row to be editable.
So what exactly do you want to happen when the user clicks on a row in Band 0?