Validate datetime value column fields

Posted by: dhivya-fp on 8 September 2017, 7:51 pm EST

  • Posted 8 September 2017, 7:51 pm EST

    Hi,

    I am using farpoint grid in asp.net application.I am not using the designer but programmatically setting the properties.

    The farpoint grid is boud to the dataset from the database.There are 2 columns which are of type datetime. I have also created a custom cell type to specify the datatime format to dd-mmm-yyy. Two such column values are

    1.Actual start date 2. Actual End Date and Actual End Date >= Actual Start Date

    Is there any way where when the user enters a Actual End data with value lesser than the Actual Start Date, there should be a notification saying that to enter a data with higher value..This should happen even before saving the grid data.

    Is this possible ? Is there anything like control to validate /  column to validate that can be set after the databind ?? 

    We have a SAVE button which will save the grid values to the database at one time.Each row does not has update button. Instead there is a single SAVE button at the bottom of the grid to SAVE changes in one go..

    Please suggest a possible solution.

    Thanks.

     

     

     

  • Posted 8 September 2017, 7:51 pm EST

    Hello,

    You need to make sure the DataAutoCellTypes property is set to False for the Spread or the cells you set for your custom celltype will be overwriten to be of type set from the bound DataSource.

    You may have a look at the earlier discussed Thread where a validation is set for Custom DateTime CellType.

    Thanks,

     

     

     

     

     

  • Posted 8 September 2017, 7:51 pm EST

    Thanks Deepak.

    (far point-- ASP.NET application-- Has a child sheet view--I donot use the designer.)

    What I wanted is compare the cell values and alert the user to enter a different value.

    1. My spread has 2 cells wiht custom date time celltype which does validation on date format(dd-mmm-yyyy). I want to compare these 2 cells. For e.g datecell1 and datecell2, if datecell2<datecell1 , i need to show an error message. 

    2.I need to do the above validation when i Tab out of the datecell2.

    I have implemented custome cell as folows: 1.created a control from spread datetimecell type and used the same in the cells

    2. calendarscript.htc file validates the date format in the 2 cells.

    Please suggest on how to implement this datefield comparison.Please not that I need comparison only on these 2 cells and not on any other cells in that row.

    Thanks.

  • Posted 8 September 2017, 7:51 pm EST

    Thanks Deepak.

    (far point-- ASP.NET application-- Has a child sheet view--I donot use the designer.)

    What I wanted is compare the cell values and alert the user to enter a different value.

    1. My spread has 2 cells wiht custom date time celltype which does validation on date format(dd-mmm-yyyy). I want to compare these 2 cells. For e.g datecell1 and datecell2, if datecell2<datecell1 , i need to show an error message. 

    2.I need to do the above validation when i Tab out of the datecell2.

    I have implemented custome cell as folows: 1.created a control from spread datetimecell type and used the same in the cells

    2. calendarscript.htc file validates the date format in the 2 cells.

    Please suggest on how to implement this datefield comparison.Please note that I need comparison only on these 2 cells and not on any other cells in that row.

    Thanks.

  • Posted 8 September 2017, 7:51 pm EST

    Hi,

    Please can I have a guidance on how to implement this.It will be very helpful if I can get the solution as early as possible.

    Thanks,

    Dhivya

  • Posted 8 September 2017, 7:51 pm EST

    Dhivya,

    It seems you are using Spread for ASP.net (as your post is in Spread for Windows section) and it has been answered here.

    Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels