-
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
-
Re: CheckBox in DataGrid
I have exactly the same problem :mad:
Did you find a way to resolve it? Does anyone know how to handle this situation?
pls help, thank you
-
Re: CheckBox in DataGrid
-
Re: CheckBox in DataGrid
-
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)