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

  • Infodream 5 days, 13 hours 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.

  • 117p
    Sean Lawyer117p 5 days, 11 hours ago


    You should use GcTimeSpanCellType for that.


  • Infodream 3 days, 16 hours 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 19 hours, 46 minutes 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;

  • 86p
    Reeva86p 19 hours, 3 minutes 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.