Parse boolean value to Yes/No in datagridview of vb.net windows forms application

核能气质少年 提交于 2019-12-08 09:07:04

问题


I'm there is a gridview on a form of my windows forms application. it gets it's value from a data source. the datasource contains a field "IsNew". this shows "True" or "False" in a column of my datagridview. I want to show "Yes" for True and No for False. Is it possible? Please Help.


回答1:


if you have a SELECT statement maybe you may try a DECODE; for MS SQL it should be:

SELECT CASE WHEN FieldA = 'A' THEN 'myA' ELSE 'myB' FROM myTable.



来源:https://stackoverflow.com/questions/13322430/parse-boolean-value-to-yes-no-in-datagridview-of-vb-net-windows-forms-applicatio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!