Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid - Changing Boolean to True/False
Message
De
26/11/2001 15:48:33
 
 
À
26/11/2001 15:03:03
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00585940
Message ID:
00585982
Vues:
15
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform