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
260
Validating dates of an UltraCalendarCombo when used in an UltraGrid
posted

I’m open for solutions to an issue I’m having when using an UltraCalendarCombo with an UltraGrid ; I have an UltraCalendarCombo as the EditorComponent of an column in an UltraGrid. The columns format property is set to “dd/MM/yyyy”. Since I cannot use the ValidationError event to validate the date being entered, knowing that no events will fire for the UltraCalendarCombo due to the fact it is the EditorComponent of a column in an UltraGrid. Is there a way to analyze the date value being entered by the user? It appears I can access the value and text, but not the actual value entered. Another question is there a way to use an UltraCalendarCombo as the EditorComponent of a grid column and restrict the user from entering data forcing them to use the drop down capabilities of the UltraCalendarCombo. Any advice on both questions is greatly appreciated.

Best Regards.

Parents
No Data
Reply
  • 469350
    Offline posted

    naizen said:
    Is there a way to analyze the date value being entered by the user? It appears I can access the value and text, but not the actual value entered.

    Typically, you would use the grid's BeforeCellUpdate or BeforeExitEditMode event and examine the Text property of the cell.

    The Value property of a cell reads directly from the underlying DataSource. Since you are examining the value before the update occurs, the Value will return the original value before the user changed it. But the Text property of the cell will return the actual text on the screen.

    naizen said:
    Another question is there a way to use an UltraCalendarCombo as the EditorComponent of a grid column and restrict the user from entering data forcing them to use the drop down capabilities of the UltraCalendarCombo. Any advice on both questions is greatly appreciated.

    Try setting the Style property on the column to DropDownList. I am not 100% sure, but I think that will work.

Children