Binding multi column values in one column

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?
 
M

marss

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top