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
4165
Generic Datalist as Datasource - how to make style checkbox?
posted

Hello,

I have what I think is a simple question...if I set the Datasource of a tree to be a generic list of some object like Customer (string name, date createdOn)...how can I make the style be a checkbox?

I can also set the ViewStyle to standard, but then I am not quite sure how to set the NodeText property. When you set to standard,  you don't have a column set to set the NodeTextColumn. 

Thanks,

M.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Michael. 

    You have two options. 

    The first is to use Standard ViewStyle and the NodeTextColumn property will indicate which field in the data source (which property of your Customer object) is displayed by the node. 

    Or, you can use the default (Grid) ViewStyle, nodes will not display a checkbox outside of the node, but what you can do is add an unbound Boolean column to your ColumnSet to show checkboxes. 

    So how you do it depends on whether you want to display multiple columns or not. If you are displaying multiple columns, then you have to put the checkboxes into a column. 

Children