AsciiNuGet007
2022-08-30T04:38:56Z
How I could change it to double click and checkbox changes value between 1 and 0?

I dont get how it can be one column with checkbox so I have two columns
I load a table with one column as checkbox and other column as text.

Thanks for your help


        Dim FileLocation As DirectoryInfo

        With CATEGORY

            .Header.Visible = False
            .GridLines.Mode = iGGridLinesMode.None

            .FocusRect = False
            .RowMode = True
            .Cols.Count = 2
            FileLocation = New DirectoryInfo(category_path)
            For Each File In FileLocation.GetFiles()
                .Rows.Add()
                .Cells.Item(.Rows.Count - 1, 1).Value = File.Name
                .Cells(.Rows.Count - 1, 0).Type = iGCellType.Check
            Next
            .Cols(0).AutoWidth()
            .Cols(1).AutoWidth()

        End With
Igor/10Tec
2022-08-31T14:21:43Z
Do you want to toggle the check box in the first column when the corresponding file name in the second column is double-clicked? If so, then you can try to do this in an event handler of the CellDoubleClick event. You will also need to disable the default action (editing) by setting e.DoDefault to False in the event handler.

I also do not see that you set the cell values in the check box column to 0 or 1. Add this assignment to your initialization code.
AsciiNuGet007
2022-09-01T17:24:01Z
Do I have an option of double click?
Igor/10Tec
2022-09-02T13:33:34Z
Sorry, it's not clear what you mean. The default action for double-click in iGrid is to start editing. If you need an event to process it, I mentioned it. It's CellDoubleClick.
AsciiNuGet007
2022-09-02T22:42:16Z
Problem solved


    Private Sub CATEGORY_CellDoubleClick(sender As Object, e As iGCellDoubleClickEventArgs) Handles CATEGORY.CellDoubleClick
        With CATEGORY
            .Cells(.CurRow.Index, 0).Value = Not .Cells(.CurRow.Index, 0).Value
        End With
    End Sub