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
2765
Wingrid - Header Checkbox issue
posted

Hi,

 

I am using wingrid’s new feature that allow to check all the rows with the header click. I have noticed one thing that whenever I want to uncheck all the rows, I have to uncheck  header check box twice in order to remove the selection from header however all the rows are getting unchecked with single click. Is this bug or I am missing nay property. Below is the code which I am using in InitilizeLayout () function:

 

 

 

I have also attached sample attachment.

 

Thanks,

 

With e.Layout

 

If .Bands(0).Columns.Exists("Select") Then

.Bands(0).Columns.Remove(

"Select")

 

End If

.Bands(0).Columns.Add(

"Select", "")

.Bands(0).Columns(

"Select").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox

.Bands(0).Columns(

"Select").Header.CheckBoxVisibility = Infragistics.Win.UltraWinGrid.HeaderCheckBoxVisibility.WhenUsingCheckEditor

.Bands(0).Columns(

"Select").Header.CheckBoxAlignment = Infragistics.Win.UltraWinGrid.HeaderCheckBoxAlignment.Center

.Bands(0).Columns(

"Select").Header.CheckBoxSynchronization = Infragistics.Win.UltraWinGrid.HeaderCheckBoxSynchronization.Default

 

End With

Parents
No Data
Reply
  • 6158
    Offline posted

    Hello,

    Based on your description of the problem and the code you provided, I'm unable to tell exactly why it takes two clicks of the header checkbox to uncheck all of the affected cells. The CheckState should toggle from Indeterminate, Unchecked, Checked, Unchecked, etc.

    One thing I noticed that may be causing the issue you are encountering is due to the DataType of the column. The default DataType of a new column is String. For performance purposes, the synchronization code does not attempt to convert String value to Boolean. By setting the DataType property on the column to Boolean, the synchronization code should work appropriately.

    .Bands(0).Columns("Select").DataType = Type.GetType("Boolean")

    Let me know if setting the DataType on the column helps to resolve your issue. Otherwise, we will have to take a closer look at your implementation.

    Thanks,

    Chris

Children