DateTimeCellType with time only : not able to set more than 24 hours

  • Infodream 3 months, 1 week ago

    Hi everyone,

    Is it possible with a DateTimeCellType, to set a MaximumTime higher than 23:59:59?
    I use a spread to enter duration value (not based on a date) which can be longer than 24hours.
    I tried this :
    FarPoint.Win.Spread.CellType.DateTimeCellType dateTimeCell = new FarPoint.Win.Spread.CellType.DateTimeCellType();
    dateTimeCell.UserDefinedFormat = dateFormat;
    dateTimeCell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.TimeOnly;
    spread.ActiveSheet.Cells[row, col].CellType = dateTimeCell;
    dateTimeCell.MaximumTime = new TimeSpan(100, 100, 100);

    But I’ve got an ArgumentOutOfRangeException on the last row !

    Thank in advance for your answers.

  • 122p
    Sean Lawyer122p 3 months, 1 week ago


    You should use GcTimeSpanCellType for that.


  • Infodream 3 months, 1 week ago

    Thank Sean for this answer. However, I’ve got the spread version 9. And I am afraid that there is no GcTimeSpanCellType in this version.
    I’ve added, to my project, the reference to GrapeCity.Win.pluginInputMan dll and I can’t find the cell type (there is only GcDateTimeCellType no GcTimeSpanCellType).

  • Infodream 3 months ago

    I find another cell type that do the job in version 9 : MaskCellType
    Here is my piece of code in case of :

    FarPoint.Win.Spread.CellType.MaskCellType maskCell = new FarPoint.Win.Spread.CellType.MaskCellType();
    maskCell.Mask = “##:##:##”;
    maskCell.MaskChar = ’0′;
    spread.ActiveSheet.Cells[row, col].CellType = maskCell;

  • 105p
    Reeva105p 3 months ago


    GcTimeSpanCellType was added in Spread Win version 10 as given in release notes link given below. Hence, you couldn’t find it with Spread Win version 9.

    Here is the link to download the latest Spread for Winforms version 10:-


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to create new topics.