Hi There,
I have ultraWinGrid, in which I need to enable the multiple row selection. With the following code in the MouseUp event, its working fine:
UltraGrid
;
// Get the row that was clicked on, if any.
(e.X, e.Y));
)
{
// Clear any cell or column selection.
grid.Selected.Cells.Clear();
grid.Selected.Columns.Clear();
// Toggle the selection of the row.
row.Selected = !row.Selected;
}
But the problem is, I want to raise the MouseUp event only if I click the row with Ctrl or Shift key pressed. Is there any property to set for using the ctrl or shift keys?
Thanks in Advance,
Santosh
Hi Santosh,
I don't understand what you are trying to do here. The grid already has built-in support for selecting multiple rows. In fact, this is the default behavior.
You don't need to do anything in the MouseUp event.
grdTransactions.DisplayLayout.Override.SelectTypeCell = SelectType.None;
grdTransactions.DisplayLayout.Override.SelectTypeRow = SelectType.Extended;
grdTransactions.DisplayLayout.Bands[0].Override.SelectTypeCell = SelectType.None;
grdTransactions.DisplayLayout.Bands[0].Override.SelectTypeRow = SelectType.Extended;
using this code, the Cell selection can be disabled. But row selection was not enabled.
Hi Mike,
In the default behavior of the grid, we can be able to select the multiple cells, rite?
Even if not, my grid - as in its implementation, allows me to select multiple cells. If I want to make this multiple row selection, what exactly do I need to do?
I have tried changing the
e.Layout.Bands[0].Columns["SwipedTimeDisplay"].CellActivation
e.Row.Cells["CheckNumber"].Appearance.Cursor
But nothing is working. Give me some idea, what makes to select the entire row or just the cell.
Thanks,