We have a pair of gridd that are supposed to be used in drag and drop mode only. No editing is supposed to be possible.
I have set the grids up with this command:
lay.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.
.SingleAutoDrag;
(sorry, that's supposed to be one line. The forum editor broke it up into 3.)
However, if the user presses ctrl+spacebar, the first cell of the selected row goes white and gets the focus border, misleading the user into thinking something can be edited.
How can I suppress this?
Ctrl+Spacebar selects the current object. My guess is that you are selecting the active cell and not the row. So you probably want to set SelectTypeCell to None, also.
Not making a difference. Strange.
I put the call last in all the grid settings calls. Even in my little test app its not preventing ctrl+space from making the first cell white.
Fully written out, I have done this:
ultraGrid.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWindGrid.SelectType.None;
Is that correct? Are there any other settings that may conflict with this one? (although, as I said, it is the very last one).
Hello,
You might try the following approach:
private void ultraGrid2_BeforeCellActivate(object sender, Infragistics.Win.UltraWinGrid.CancelableCellEventArgs e) { e.Cancel = true; }
Please feel free to let me know if I misunderstood you or if you have any other questions.
Ugh.
The production code already is full of extremely complex handling of Before/AfterActivated, MouseDown and semaphores to keep track of states on the Row level already.
I am not keen on introducing similar code on Cell level if a simple single-line initialization will do.
I just need to know how it is done correctly, in keeping with the philosophy of the UltraWinGrid.
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
Hi Boris, thank you for enquiring. I tried all of Mike's suggestions.
Setting grid.DisplayLayout.ActiveAppearancesEnabled to False did the trick.
Mike's answer had a bunch of ideas, it seemed unhelpful to set "Verify Answer" to ALL of them :)
But I'll do that now, to close the thread.
Correction:
grid.DisplayLayout.Override.ActiveAppearancesEnabled = DefaultableBoolean.False;
(Just in case someone else also needs this solution. Mike forgot the Override)