Question : asp.net Can I put more that one mssql table 'field' in one GridView Column?

Can I put more that one mssql table 'field' in one GridView Column?

Answer : asp.net Can I put more that one mssql table 'field' in one GridView Column?

Yes, There are a couple of different ways.

1) In the actual SQL that you use to select the field you could do concatenation:
So instead of a) Select FirstName, LastName, Address from Employee, you could write
b) Select FirstName + ' ' + LastName as Name, Address from Employee

That is one way.

2) On the RowDatabound Event you could write some code to play around with what goes in what cell.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx

3) You could send the data down as JSON and render a gridview with JQuery

4) You could generate HTML yourself and then do with the recordset what you please

Lots of options, hope this helps.
Random Solutions  
 
programming4us programming4us