Formatting the data ,when spread in binded to dataset.

Posted by: vkempanna on 8 September 2017, 12:50 pm EST

  • Posted 8 September 2017, 12:50 pm EST

    Hi,


    I am using Spread 3.0.


    In my application i have a spread which is binded to Dataset.


    The Dataset has a column  whose datatype is of boolean.


    when the value in this column is "True" i  want to display value "Yes"  in spread and when the value in


    column is "False" , i want to display value "No" in spread.


    While saving back the changes i want store "True" in the Dataset if the spread has value "Yes" and "False" if the spread has value "No".


    How can  this be accomplished?


    Regards


    Vinutha

  • Replied 8 September 2017, 12:50 pm EST

    Vinutha,


    You can define a Column's CellType as a CheckBoxCellType as follows to get this behavior.

     
    		Dim c As New FarPoint.Win.Spread.CellType.CheckBoxCellType
    c.TextTrue = "Yes"
    c.TextFalse = "No"

    FpSpread1.Sheets(0).Columns(1).CellType = c
    FpSpread1.Sheets(0).Cells(0, 1).Value = False
    FpSpread1.Sheets(0).Cells(1, 1).Value = True
     
Need extra support?

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

Learn More

Forum Channels