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
360
How to make CheckBox in grid initially checked
posted

I have a WinGrid with an unbound column with Style Checkbox; I would like it to be initially checked. I have set the DataType to System.Boolean, and the DefaultCellValue to true, but the checkboxes are all unchecked when the grid is made. How can I get it to show the checks?

In addition, how can I set the checkbox checked state programatically in general? It seems to be difficult... Thanks!

Parents
No Data
Reply
  • 53790
    posted

    Hello Joels,

    Maybe one possible approach to achieve desire behavior is to use the code below:


    private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
    {
     if (!e.ReInitialize)
      {
       e.Row.Cells["Column key"].Value = true;
      }
    }

    Please if you have any questions, do not hesitate to ask me
    Regards

Children
No Data