首页 新闻 会员 周边 捐助

Repeater显示的问题

0
[已解决问题] 解决于 2013-05-11 14:22

框框怎么不显示了???求破,求破啊

<tr>
                   <td colspan="4" align="center">
                       <table id="storeTable" border="1" cellpadding="0" cellspacing="0" width="100%">
                           <tr id="tr_head" runat="server" align="center"
                               style="font-weight: bold; color: white; background-color: #3D76C3;">
                               <td>
                                   日 期
                               </td>
                               <td>
                                   单号
                               </td>
                               <td>
                                   物料编号
                               </td>
                               <td>
                                   品名规格
                               </td>
                               <td>
                                   来料重量
                               </td>
                               <td>
                                   出货重量
                               </td>
                               <td>
                                   备注
                               </td>
                           </tr>
                           <asp:Repeater ID="rpt_storeinfo" runat="server"
                               OnItemDataBound="rpt_storeinfo_ItemDataBound">
                               <ItemTemplate>
                                   <tr ID="tr_info" runat="server">
                                       <td>
                                           <asp:Label ID="lbl_date" runat="server" Text='<%# Eval("riqi") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_DanH" runat="server" Text='<%# Eval("bianhao","{0:d}") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_WLBH" runat="server" Text='<%# Eval("WLbianhao") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_PingM" runat="server" Text='<%# Eval("pinmingguige","{0:N2}") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_LaiQty" runat="server" Text='<%# Eval("LaiQty","{0:N2}") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_OutQty" runat="server" Text='<%# Eval("OutQty","{0:N2}") %>'></asp:Label>
                                       </td>
                                       <td>
                                           <asp:Label ID="lbl_BeiZ" runat="server" Text='<%# Eval("beizhu") %>'></asp:Label>
                                       </td>
                                   </tr>
                               </ItemTemplate>
                           </asp:Repeater>
                       </table>
                   </td>
                </tr>

NothingHave的主页 NothingHave | 初学一级 | 园豆:6
提问于:2013-05-10 11:06
< >
分享
最佳答案
0

你可以在每个绑定字段内容后加一个&nbsp;空格就可以了

奖励园豆:5
KivenRo | 小虾三级 |园豆:1734 | 2013-05-10 16:54
其他回答(1)
0

对于Repeater的显示,需要设置DataSource属性和执行DataBind方法,你检查下。DataSource为空,或数据长度为0,也不会显示ItemTeplate。

幻天芒 | 园豆:37205 (高人七级) | 2013-05-10 11:23

怎么设置DataSource属性和执行DataBind方法啊?我的是数据为空时,他不显示了

支持(0) 反对(0) NothingHave | 园豆:6 (初学一级) | 2013-05-11 08:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册