I have GridView which displays data like this
Name Type Description abc 1 test xyz 2 test mno 1 another test
This Data is retreived from sqldatasource.
Question: I want to display type Name instead of ID Eg( if type =1 then it should display “Truck” and if Type = 2 it should display “Driver”) I have only 2 types(Truck and Driver)
Can anyone please help me in this?
Thanks,
S
You can replace the current
BoundFieldyou have for the “Type” column to aTemplateField.I’m assuming you are not setting the
GridViewAutoGenerateColumnsto true.