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
255
Adding UltraGrid Checkbox Column
posted

I'm having an issue when I add a checkbox column to my datagrid. I am adding the column during the InitializeLayout event. The problem is, when the form loads, all the checkboxes in the checkbox column are completely filled in. Am I doing something wroing? Here is the code I am currently using in the InitializeLayout Event and a picture to show what is going on. Thanks. -Ted

        Dim checkColumn As UltraGridColumn = e.Layout.Bands(0).Columns.Add("Batch", "Batch")
        checkColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox
        checkColumn.CellActivation = Activation.AllowEdit
        checkColumn.Header.VisiblePosition = 0

Parents
  • 280
    Suggested Answer
    posted

    hi tkochi i add checkbox in ultra grid in this way

    '/////////////////////////add checkbox in ultragrid///////////////////////////////////////////////////
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns.Add("checkbox", "checkbox")

    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("checkbox").Header.CheckBoxVisibility = HeaderCheckBoxVisibility.WhenUsingCheckEditor

    'Aligns the Header checkbox to the right of the Header caption
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("checkbox").Header.CheckBoxAlignment = HeaderCheckBoxAlignment.Right

    'The checkbox and the cell values are kept in synch to affect only the RowsCollection
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("checkbox").Header.CheckBoxSynchronization = HeaderCheckBoxSynchronization.RowsCollection

    Me.UltraGrid1.DisplayLayout.Bands(0).Columns("checkbox").Style = ColumnStyle.CheckBox
    '///////////////////////////////////////checkbox code is end there//////////////////////////
    End Sub

    if u want more help please check my demo code

    http://ahmadkhalid44.blogspot.com/2013/05/work-on-ultra-grid.html

Reply Children