| |

VerySource

 Forgot password?
 Register
Search
View: 1471|Reply: 10

Ask DataList Binding Header

[Copy link]

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-20 18:00:02
| Show all posts |Read mode
<HeaderTemplate>
<asp: Label id = Label1 runat = "server" Text = '<% # DataBinder.Eval (Container, "DataItem.BBS_modulename")%>'> </ asp: Label>

</ HeaderTemplate>
  
 I want the header to display the contents of the first row and first column of the DataSet binding. How do I write it?
   '<% # DataBinder.Eval (Container, "DataItem.BBS_modulename", "{0: n}")%>'
I see this writing on the Internet and I do n’t know what it means. It does n’t work.
Reply

Use magic Report

0

Threads

9

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-27 23:30:01
| Show all posts
The header can be bound, huh?
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-28 09:45:01
| Show all posts
All other content in the DataList can be displayed, but the header cannot be displayed
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-30 13:45:02
| Show all posts
<%# DataBinder.Eval(Container, "DataItem.BBS_modulename") %>

Change to <%# DataBinder.Eval(Container.DataItem,"BBS_modulename") %>Try!
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-30 18:00:01
| Show all posts
to七分幸福
Still not okay
There is some data in the BBS_modulename field. I want it to display the data in the first row. Should I write this?
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-7-4 10:45:01
| Show all posts
There is a stupid way,
Take the first row of data in the background and put it in the PROTECTED variable
Bind this variable in the foreground, that is, add code in the background,

I hope the master will give a good way
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-5 11:00:01
| Show all posts
It's really troublesome~ Is there something simpler
to:3521565Thanks in advance
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 Korea, Republic of

Post time: 2020-7-5 18:15:01
| Show all posts
Header cannot bind data
You can bind in ItemTemplate
Building a table inside can also achieve the effect
<ItemTemplate>
<table>
<tr>
<td>
</td>
<tr>
</table>
</ItemTemplate>
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-6 18:45:01
| Show all posts
tobjpapaya:
  In <ItemTemplate> some are ok, but if there are 5 records, it will be displayed 5 times. What I want is that it is displayed only once, so it is written in the header!
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-7-10 13:45:01
| Show all posts
<table>
<ItemTemplate>

<tr>
<td>
</td>
<tr>

</ItemTemplate>
</table>
This is displayed once
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list