datagrid?

  • Thread starter Thread starter DzemoT.
  • Start date Start date
D

DzemoT.

I have two columns in my database (example: Male as boolean and Name as
string). How to get in datagrid if male= true to show name for that row or
else to get empty row. (can i in database write something as "if male=true
then name else '' "
thx
 
You can make it using T-SQL , search books online to how to use conditional If statement
O
you can handle the onItemCreated event of your datagrid and append the text you like .
 
'put in a loop for each row:

If (datagrid1.Items(i).Cells(0).Text = "0") Then datagrid1.Items(i).Cells(1).Text = " "
 
Back
Top