Hi all,
In my application, I have a grid with some cells disabled for editing and some cells with allow editing. I wan to make these editable cells to accept only numeric entries. There is a way to handle the key down event of grid and only accept the numeric keys. Is there some other way to do this. During my R&D I came to know a property "Editor" of cell which accept "Infragistics.Win.EmbeddableEditorBase" object. Is this helpful in this regard and what will be the way?
Thanks
Habib Ahmad
Post in wrong spot, sorry :)
Hi Habib,
Again, you could do this using an editor, but there is an easier way. Simply set the Style property on the Cell instead of the Column. Or... set it on the column and then override the column setting by setting it again on individual cells.
There's really no reason to use an UltraNumericEditor for this. The grid already has numeric editing capability built-in. But if you really feel that you must use an editor, then all you do is put an UltraNumericEditor on the form and set the properties you want on it, then assign the EditorControl of the column or cell to the UltraNumericEditor control.
Hi Mike,
Thanks for reply.
The actual problem is that my grid have some rows to be shown as heading. And rows below a heading will have editable numeric cells. Now heading can have Alpha numeric values in cells where as data rows will only have numeric values. If I change the style property of cell to use some numeric style or use input mask for numeric input, then heading rows does not work for alphanumeric data. I think the final solution is to use an editor. I just need some sample code that how to use UltraNumericEditor in grid cell.
If you want to mask the input of a cell, you could use an Editor, but that's the complicated way to do it. A much easier way is to set the Style property of the column. There are styles that only allow numeric values. If none of the styles suit your needs, then another way to do it would be top use the InputMask (or maybe it's MaskInput, I always get them mixed up) property of the column.