S
Sharon
Hello All,
I need to create a template field in gridview with table of one column
repeating as 5 columns. Any ideas and suggestions guys. Cheers,
Shilpa.
Something like this.
ProductImage productImage productImage productImage productImage
ProductName ProductName ProductName ProductName ProductName
I have tried this in templatefield of gridview but the data is showing
as one column
<table width="120" border="0" cellpadding="0" cellspacing="0"><tr><td
width="120" align="center" class="box"><img src="<%# Eval("imageurl")
%>" width="100" height="100" border="0"></td></tr>
<tr><td width="8"> </td></tr>
<tr valign="top">
<td align="center" class="txt-1bold">$<%# Eval("Price") %></td><td> </
td></tr>
<tr valign="top">
<td width="120" align="center" class="txt-main"><%#
Eval("ProductName") %></td></tr>
<tr><td> </td></tr>
</table>
protected
void DisplayProducts(int cid)
{
DataSet ProductList = new DataSet() ;
string cmd = "StoredprocedureName" + cid;
ProductList = a.SelectDSQuery(cmd);
GridView1.DataSource = ProductList;
GridView1.DataBind();
}
Thanks in Advance for your help. Best Regards
I need to create a template field in gridview with table of one column
repeating as 5 columns. Any ideas and suggestions guys. Cheers,
Shilpa.
Something like this.
ProductImage productImage productImage productImage productImage
ProductName ProductName ProductName ProductName ProductName
I have tried this in templatefield of gridview but the data is showing
as one column
<table width="120" border="0" cellpadding="0" cellspacing="0"><tr><td
width="120" align="center" class="box"><img src="<%# Eval("imageurl")
%>" width="100" height="100" border="0"></td></tr>
<tr><td width="8"> </td></tr>
<tr valign="top">
<td align="center" class="txt-1bold">$<%# Eval("Price") %></td><td> </
td></tr>
<tr valign="top">
<td width="120" align="center" class="txt-main"><%#
Eval("ProductName") %></td></tr>
<tr><td> </td></tr>
</table>
protected
void DisplayProducts(int cid)
{
DataSet ProductList = new DataSet() ;
string cmd = "StoredprocedureName" + cid;
ProductList = a.SelectDSQuery(cmd);
GridView1.DataSource = ProductList;
GridView1.DataBind();
}
Thanks in Advance for your help. Best Regards