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
270
CheckBox column
posted

I have a DataTable bound to an UltraWebGird;  the DataTable has a column which contains either a Y or N value that I would like to represent as a checkbox.  How do I go about doing this? In the WinForms world with an individual checkbox I would typically do this by handling the .Parse and .Format events on the binding.

  • 28464
    Verified Answer
    posted

    Hello,

    The CheckBox column binds automatically if the datasource value type is boolean (or bit, in MS Access terms) - true / false. For Y/N I see a few options:

    1) Modifying the DataTable manually first - e.g. create a new DataTable that has column type bool/bit instead of chart and make all "Y" occurrances true, "N" - false.

    2)  Handle the InitializeRow event and then locating the Cell of the respective row (e.g. though Row.Cells.FromKey["CheckBoxColumn"]) and then setting its Value field to true / false depending on the datasource.