dataGridView Binding
-
i have a gridview and bind it to datasource. gridview has a bounded boolean column. i want if grid to be not editable expect those cells in the boolean column where value is false. in other words: all columns are readonly expect the boolean column not readonly. if the value of the cell in boolean column 1- true: the cell is readonly 2- false: the cell is not readonly i tried this code but i do not know why it does not work. For Each x As DataGridViewRow In DataGridView1.Rows If x.Cells("DeductionAdded").Value.ToString.ToLower = "true" Then x.Cells("DeductionAdded").ReadOnly = True End If Next
-
i have a gridview and bind it to datasource. gridview has a bounded boolean column. i want if grid to be not editable expect those cells in the boolean column where value is false. in other words: all columns are readonly expect the boolean column not readonly. if the value of the cell in boolean column 1- true: the cell is readonly 2- false: the cell is not readonly i tried this code but i do not know why it does not work. For Each x As DataGridViewRow In DataGridView1.Rows If x.Cells("DeductionAdded").Value.ToString.ToLower = "true" Then x.Cells("DeductionAdded").ReadOnly = True End If Next