Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

can we combine more than one field of data on SQL table and display on Gridview?

$
0
0

Hi, I have a SQL table and need to display them on gridview of web form project.

I want to combine two or three fields of  data in SQL table and display them as one column in gridview, is that possible?

For example, I have ProductID and ProductDescription fields on SQL table, in stead of display them as two columns in gridview, now I want to display them as one column in gridview labeled column header to "Product" and with the column items as combination of "ProuctID" + "-" + ProductDescription.

Are there any easy way to achieve it? I am thinking to create a stored procedure and combine the two fields of data on stored procedure as one field, then display this new combined field in datasoure and binded it in gridview. Is that possible? or we have other easy way? thanks for any response. 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>