Hi, I need to select multiple cells at one time in Ultragrid and do copy/paste. But I can only select one cell no matter how I drag the mouse. I noticed if I disable the edit mode then I can select multiple cells. But I don't want to disable edit, I need to edit the cells when I click them. Anyone can help ?
Since our users can be pretty picky about having to double click every cell they want to edit, I was able to use the MouseUp function to handle this. If the user let go of the left mouse button and only 1 cell is selected, I will enter edit mode. If more than 1 cell is selected I will copy the value from the first cell and paste it down into the other cells. Please make sure you AllowEdit on all cells you want editable.
Hello,
By default you could select multiple cells while you hold the control button and than select the desired cells.
When you click on the cell the behavior is to enter edit mode because the Grid CellClickAction is set to .Edit
One way to achieve what you are looking for is the use the following approach: EnterEditMode when you double click the Cell and in the same time you will be able to multi select while dragging the mouse over the cells multi select them:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect; }
private void ultraGrid1_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e) { ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode); }
Please let me know if this is acceptable for you.
Sincerely,
Danko
Developer Support Engineer, MCTS
Infragistics
www.infragistics.com/support