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
785
Removing All Display of Cell Content
posted

Hello,

I am manually adding UnboundField instances to XamDataGrid.FieldLayouts. These fields are bound to something whose actual type is bool. However, I'm setting UnboundField.DataType to typeof(string). I do this because I do not what checkboxes to appear in the grid. However, using typeof(string) causes either "True" or "False" to appear! I don't want this either. What I want is for no content to be displayed at all. (The cell's value will be communicated to the user by setting CellValuePresenter.Background based on the cell's content.) How may I do this?

Thanks,

Dave

 

Parents
  • 69686
    posted

    Hello Dave,

    The default value editor for a boolean type is XamCheckEditor. If you change the DataType , then the editor will change accordingly to the new type. As you have set it to string, the value of that cell will be the string representation of a boolean value, which can be True or False. 

    As you have bound the Field to some data, it will display value - which again are True or False.

    I am not sure why you do not want to display any values in a field and why not hide it, but I guess you can make it a nullable boolean "bool?" which will default to null.

Reply Children
No Data