I want to make a grid control act like a select list. That is, I want to be able to highlight rows, but not be able to edit them. I want to create both a single row selection list, where only one row can be highlighted, or a multi-row select list, where multiple rows can be selected at the same time.
I am close. I have
GrdCtl.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False; GrdCtl.DisplayLayout.Override.SelectTypeCol = SelectType.None; GrdCtl.DisplayLayout.Override.SelectTypeCell = SelectType.None; GrdCtl.DisplayLayout.Override.CellClickAction = CellClickAction.RowSelect; GrdCtl.DisplayLayout.Override.BorderStyleRow = UIElementBorderStyle.None; GrdCtl.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.None;
GrdCtl.DisplayLayout.ViewStyle = ViewStyle.SingleBand;
This mostly works, but I have some weird behaviors, I think associated with the active cell/row.
Sometimes I see an outlined, not highlighted, row that appears the be the active row. I would like it to look like other non-hihglighted rows.
I think the highlighted row and the active row are usualy the same row, but it looks highlighted so that is okay, but sometimes it seems to have the active appearance, which looks unhighlighted, but with a border. That is not okay. And in this case, if I move the mouse (button up) off of the row it changes to the highlighted row appearance.
So what do I need to do to make this work like a row-selection control?
thanks
HOWTO:How can I turn off the Focus Rectangle on an Infragistics Win Control?
I didn't realize that was the focus rect I was looking at. Thanks that fixed most of the problem.
However, I still have one behavior to be dealt with. This is strange. Sometimes, not all the time, when I click on an item and release again quickly the item is shown in its non-highlighted state. Then if I move the mouse off of the the item (with the button still up) the item is shown in its highlighted state.
I don't have any settings connected to hot tracking. i.e. when the mouse is up over an item, it looks like any other unhighlighted item or (if the item is highlighted) like a highlighted item.
Unfortunately, Its intermittent and fairly infrequent. It might take 3 or 4 minutes of fooling around until it happens. And I haven't been able to isolate the cause.
I'll seen what I can do.
Hm, I've never heard of that happening. My guess is that something in your code or some particular combination of property settings is causing it.
Are you able to duplicate this reliably? If you can tell me how to get this to happen, I'd be happy to try it out, but I'm afraid I can't really guess what's causing it without seeing it in action. A video of what's happening might help, too.
One thing I would recommend is that you get the latest service release. Maybe this is a bug that is already fixed.
How to get the latest service release - Infragistics Community