Results 1 to 5 of 5

Thread: CheckBox in DataGrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    1

    CheckBox in DataGrid

    Hi there,
    In a datagrid which is bonded to a dataview, I want to change a field of table. I show this field as Datagridboolcolumn and set its properies. When I run the program, this column isn't affected. This column for all records checked by a gray checkbox (with every value). I focus on a column and change its checked value, but when I focus on another record, its situatioin is checked again. What's wrong about it? Datatype of field? Grid? etc
    Thanks alot.
    Sunlight

  2. #2
    Addicted Member dani2's Avatar
    Join Date
    Feb 2005
    Location
    Sibiu.ro
    Posts
    191

    Re: CheckBox in DataGrid

    I have exactly the same problem
    Did you find a way to resolve it? Does anyone know how to handle this situation?

    pls help, thank you

  3. #3
    Addicted Member dani2's Avatar
    Join Date
    Feb 2005
    Location
    Sibiu.ro
    Posts
    191

    Re: CheckBox in DataGrid

    nothing?

  4. #4
    Addicted Member dani2's Avatar
    Join Date
    Feb 2005
    Location
    Sibiu.ro
    Posts
    191

    Thumbs down Re: CheckBox in DataGrid

    nobody??

  5. #5
    New Member
    Join Date
    Oct 2004
    Location
    The Netherlands
    Posts
    15

    Re: CheckBox in DataGrid

    Private Sub Datagrid_Formatting()
    '----------------------------------------------------------------------------------------
    Dim tsDel As New DataGridTableStyle
    With tsDel
    .MappingName = DataSetHsb.tDEL.TableName
    .AlternatingBackColor = Color.LightGray
    End With

    Dim DelCol1 As New DataGridTextBoxColumn
    With DelCol1
    .MappingName = DataSetHsb.tDEL.DelNumberColumn.ColumnName
    .HeaderText = "ID"
    .Width = 0
    End With

    Dim DelCol2 As New DataGridTextBoxColumn
    With DelCol2
    .MappingName = DataSetHsb.tDEL.DelNameColumn.ColumnName
    .HeaderText = "Name"
    .Width = 150
    End With

    Dim DelCol3 As New DataGridTextBoxColumn
    With DelCol3
    .MappingName = DataSetHsb.tDEL.DelAmmountColumn.ColumnName
    .HeaderText = "Amount"
    .Width = 50
    End With

    Dim DelCol4 As New DataGridBoolColumn
    With DelCol4
    .MappingName = DataSetHsb.tDEL.DelSelectColumn.ColumnName
    .HeaderText = "Select"
    .Width = 50
    End With
    tsDel.GridColumnStyles.Add(DelCol1)
    tsDel.GridColumnStyles.Add(DelCol2)
    tsDel.GridColumnStyles.Add(DelCol3)
    tsDel.GridColumnStyles.Add(DelCol4)

    DataGrid1.TableStyles.Add(tsDel)
    H.D. van Aarsen
    The Netherlands

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width