Binding multi column values in one column

  • Thread starter Thread starter Larry R
  • Start date Start date
L

Larry R

Asp.net 2.0. Binding a Gridview. UNtil now, it had been simple
BoundColumns, but now I need to have one column show the values of 3
columns ( they are in the same datasource).

I thought that I should just be able to use a template sucha as :

<asp:TemplateField d>
<HeaderTemplate><asp:Label runat=server>Test</
asp:Label></HeaderTemplate>
<ItemTemplate>
<asp:Label runat=server><%Eval("F");%>//<%Eval("M");
%> <%Eval("L"); %></asp:Label>
</ItemTemplate>
</asp:TemplateField>

but that didn't work out.

Any suggestions?
 
Larry said:
Asp.net 2.0. Binding a Gridview. UNtil now, it had been simple
BoundColumns, but now I need to have one column show the values of 3
columns ( they are in the same datasource).

I thought that I should just be able to use a template sucha as :

<asp:TemplateField d>
<HeaderTemplate><asp:Label runat=server>Test</
asp:Label></HeaderTemplate>
<ItemTemplate>
<asp:Label runat=server><%Eval("F");%>//<%Eval("M");
%> <%Eval("L"); %></asp:Label>
</ItemTemplate>
</asp:TemplateField>

but that didn't work out.

Any suggestions?

Hi,
You miss # in data binding expression.
Correct <%# Eval("F") %> and so forth.
Regards, Mykola
http://marss.co.ua
 
Back
Top