0

Hello,

I have a scenario where I fetch all the records from a database table using ADO.Net and I want to convert one of the column values which has either "0" or "1". If 0, then "No" should be replaced with 0 and if 1, then it should be "Yes".
For instance, if the following data is there in the table :-

  • Item1 1
  • Item2 0
  • Item3 1

then, it should display in the DataGridView as :-

  • Item1 Yes
  • Item2 No
  • Item3 Yes

Any help is appreciated whether in C# or VB.Net.

3
Contributors
4
Replies
17
Views
4 Years
Discussion Span
Last Post by KM499
0

Actually I was trying to get the data through ADO.Net in WinForms for a DataGridView, I don't think these suggestions would work for me :)

0

Hey, I did this one by my own but thanks for your replies anyways :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.