Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid - Changing Boolean to True/False
Message
From
26/11/2001 15:48:33
 
 
To
26/11/2001 15:03:03
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00585940
Message ID:
00585982
Views:
14
>I have a user-defined SQL extract that populates a DataGrid from SQL 7.0 tables.
>How do I change the default numeric value for a boolean field to True/False? I already know how to change the column caption and alignment. Thanks for any help.
>
>Stan Symons

You can use this code to change the format of logical fields in an MS Datagrid control: (oRSD is the grid's datasource, ADO recordset)
   For Each clmn In Grid1.Columns
      If oRSD.Fields(clmn.ColIndex).Type = adBoolean Then
         With clmn.DataFormat
            .Type = 5
            .TrueValue = "True"
            .FalseValue = "False"
         End With
      End If
   Next
Hope this helps.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform