I think the easiest way is to change the source to output Yes/No instead of true/false. But, if that not doable, you also can write code to manipulate the DataTable(I'm assuming table = DataTable). Here is an example, is not type safe, but you can enhance it. The below function will change the column boolean type to string and its value to Yes/No.
Public Shared Function ChangeColumnDataType(ByRef table As DataTable, columnname As String, newtype As Type) As Boolean
If table.Columns.Contains(columnname) = False Then
Return False
End If
Dim column As DataColumn = table.Columns(columnname)
If column.DataType = newtype Then
Return True
End If
Try
Dim newcolumn As New DataColumn("temporary", newtype)
table.Columns.Add(newcolumn)
For Each row As DataRow In table.Rows
Try
row("temporary") = Convert.ChangeType(row(columnname), newtype)
row("temporary") = If(CBool(row(columnname)), "Yes", "No")
Catch
End Try
Next
table.Columns.Remove(columnname)
newcolumn.ColumnName = columnname
Catch generatedExceptionName As Exception
Return False
End Try
Return True
End Function
Then call the ChangeColumnDataType function before the DataSource binding. I'm assuming the column name is "Active"
ChangeColumnDataType(table, "Active", GetType(String))
DataGridView1.DataSource = table
Source:
c# - Changing populated DataTable column data types - Stack Overflow[
^]