Hi
I'm using UltraGrid v7.3, and implemented following logic.
1. single click on cell will select the whole row. code: void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e) { e.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect;}
2. double click on cell edit the cells value.void ultraGrid1_DoubleClickCell(object sender, DoubleClickCellEventArgs e){ e.Cell.Activate(); this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);}
It is all right with single click and double click. I can get what I want. However if I add a maskInput for a column in InitializeLayout method. Then I double click on the cell of the column, it won't enter into edit mode again. Why is this, how could I remain double click functionality with maskInput set.
Modified InitializeLayout method:void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e){ e.Layout.Override.CellClickAction = CellClickAction.RowSelect; UltraGridColumn column = e.Layout.Bands[0].Columns["qty"]; column.MaskInput = "{double:-7.2}"; column.MaskDataMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.Raw; column.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals; column.MaskClipMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;}
Hi,
I took a look at this and I was able to reproduce the behavior you are describing. When you double-click, the grid receives two click messages. The first one selects the row, if it is not already selected. On the second click, the grid checks to see if the row you are clicking on is already selected, and if it is, it does nothing. This is how it works on a normal text cell.
But in a masked cell, the grid appears to be firing the DoubleClickCell event too early. It fires before the second click has been processed by the selection manager, so your code fires which puts the cell into edit mode, which causes the row to be deslected, and then the second click is processed which selects the row and takes the cell out of edit mode.
I tried working around this with a BeginInvoke, but nothing seems to work.
I'm going to forward this thread over to Infragistics Developer support so they can write it up for developer review, because this looks like it's probably a bug.