Home > Software engineering >  VB6 DataGrid control display data types
VB6 DataGrid control display data types

Time:10-05

Ask you a question, in VB6, I use the DataGrid space to display the contents of the database, I would like to display the content in the ACCESS database of "yes/no" type, the type of data to the contents of this control is shown in becomes "1" and "0", could you tell me how can I let him in the DataGrid control is shown as "yes/no"? Seek for a long time did not find the answer, thank you,

CodePudding user response:

Their top,,,,,,,

CodePudding user response:

If is only used to display, you can transform in the query,

SELECT the IIf (myField1, "yes", "no") As myField1Value From myTable

CodePudding user response:

Still have a kind of method, is set in the properties window of the DataGrid control:

Click controls, select properties, choose "Format" window in the window, in the Format Item drop-down list select column number, in the Format Type, select Boolean, in True Value in the input box input "is" (the default is True), the False Value in the input box input "no" (the default is False), sure,

The limitations of this method is the query field number and order must be fixed,

CodePudding user response:

refer to the second floor of123 response:
, if just for display, can be transformed in the query,

SELECT the IIf (myField1, "yes", "no") As myField1Value From myTable




Is the if?

CodePudding user response:

reference of123 reply: 3/f
another way, set in the properties window of the DataGrid control:

Click controls, select properties, choose "Format" window in the window, in the Format Item drop-down list select column number, in the Format Type, select Boolean, in True Value in the input box input "is" (the default is True), the False Value in the input box input "no" (the default is False), sure,

The limitations of this method is the query field number and order must be fixed,


Thank you, I used this method, but the first method still didn't understand,

CodePudding user response:

Leave a mark, learning how to learn
  • Related