2011-09-03 47 views
-2

我使用此代碼..但是,當超鏈接更長,然後字段大小的GridView擴展垂直。我希望下面的鏈接像段落一樣。給我一個解決方案超鏈接應該出現在多行代碼不起作用

 <asp:gridview id="titlesGrid" runat="server"  

      datasourceid="titles" 

     width=90% cellpadding=5 font-size="8pt" 

      autogeneratecolumns=false 

      headerstyle-backcolor="maroon" 

      headerstyle-forecolor="khaki" 

      headerstyle-font-bold 

      rowstyle-verticalalign="top"> 


    <columns> 


     <asp:hyperlinkfield headertext="Title" 

      datatextfield="title" 

     datanavigateurlformatstring="title_details.aspx?titleid={0}" 

      datanavigateurlfields="title_id" /> 


     <asp:boundfield headertext="Title ID" 

     datafield="title_id" /> 


     <asp:boundfield headertext="Category" 

      datafield="type" /> 


      <asp:boundfield headertext="Pub ID" 

       datafield="pub_id" /> 


       <asp:boundfield headertext="Price" 

        datafield="price" 

        htmlencode=false 

        dataformatstring="{0:n2}" 

       itemstyle-horizontalalign="right" /> 

         </columns>  



         </asp:gridview> 

回答

0

您是否嘗試過使用<ItemStyle Wrap="True" /><asp:hyperlinkfield />

+0

仍然無法正常工作..你可以告訴我,我必須把 madhuri