开发者

hyperlink should come in multiline code not working

开发者 https://www.devze.com 2023-04-01 23:03 出处:网络
i use this code .. but when the hyperlinks are longer then field size the gridview expands verticaly. i want the link below as like a paragraph . give me a solution

i use this code .. but when the hyperlinks are longer then field size the gridview expands verticaly. i want the link below as like a paragraph . give me a solution

      <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="开发者_Go百科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>


Have you tried using <ItemStyle Wrap="True" /> for <asp:hyperlinkfield /> ?

0

精彩评论

暂无评论...
验证码 换一张
取 消