Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
I need to set the mask input for a date time field at the cell level.
posted

Some cells I need the mask set just for the time and others I need it for the date and the time and others I need it just for the date.

I'm able to set the mask at the column level but not the cell level.  I found this other post that seems to be along the same lines, but not sure.  Could you provide a code sample?

http://es.infragistics.com/community/forums/t/17954.aspx

Thanks,

David

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi David,

    What you do is.. for each mask that you need, create a masked editor control. Any of the masked editors would work, but in your case, it makes sense to use a DateTimeEditor since you are dealing with dates.

    Then in the InitializeRow event of the grid, set the EditorControl property of the Cell (not the column) to the DateTimeEditor with the appropriate mask.

    Since the grid column has properties to control the mask, you also have to tell the column to use the mask from the editor over it's own mask settings. So you need to set UseEditorMaskSettings on the column to true.

    WindowsFormsApplication18.zip
Reply Children