Hi,
I'm trying to set the MaskInput on a grid column in the InitializeLayout handler for one of my grids. The following is the code I'm using to enable this:
// Set mask input for the Order Qty field
if (column.Key == QAD.WorkOrder.Constants.WorkOrderOrderQuantityFieldName)
{
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;
}
The problem I'm running into is that when my application comes up and I go to try and edit a grid cell in that column, the cell goes into edit mode for a split second and then exits edit mode. In effect, I now cannot edit the cell related to the column unless I remove the MaskInput code I've put in above. What could be the possible reasons why this is happening?
Thank you,
Steve
There is nothing about a mask that should make a cell exit edit mode all by itself. You should handle the BeforeExitEditMode event, put a breakpoint in the handler, and check out the call stack to see what is triggering the exit.
Hello Svete,
I have create a small sample based on your approach and evertything works as expected. Could you please follow Brain's suggestion and let me know if you have any other question.
Please find the attached sample below:
Thanks Brian/Danko ... I suspect there is a property setting or possibly interaction with another event that is causing this to happen. I'll try out Brian's suggestion and check out the sample project and see if I can see what might be the issue ...
Hi Steve,
The grid column has a MaxValue property, as well as a MinValue.
Hi Brian/Danko ... I am back revisiting this issue again because I don't think using MaskInput in this particular case is the best thing to do. What I'm trying to do is basically set a maximum value for a particular field in a couple of grids and for a control on a winform. I'm wondering now if there is a better way to do this. Is there a MaxValue property I can use on the grid and winform control to limit the entry of these fields? A different property that might work better?
Thank you!
Hello Steve,
If you have any other questions or if you are still experiencing the same behavior please let know.