This is a migrated thread and some comments may be shown as answers.

display html "<br/>"in a column

1 Answer 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 18 Jun 2011, 02:16 AM
How can I display an htmlcode inside a colum?

I have this:

<telerik:GridDropDownColumn
                                                    UniqueName="elementocostosrowid"
                                                    DataField="elementocostosrowid"
                                                    HeaderText="Categoria -<br />Elemento Costos" DataSourceID="sqlElementoCosto" ListTextField="dummy2"
                                                    ListValueField="rowid" SortExpression="elementocostosrowid"
                                                    DropDownControlType="DropDownList">
                                                </telerik:GridDropDownColumn>
 
 
<asp:SqlDataSource ID="sqlElementoCosto" ConnectionString="<%$ ConnectionStrings:GolosaNETConnectionString %>"
                                        ProviderName="System.Data.SqlClient" SelectCommand="SELECT a.rowid,b.descripcion + '[' + CONVERT(varchar(5),b.categoria)+']<br />' + a.descripcion + '[' + CONVERT(varchar(5),a.elementocostos)+']' as dummy2 FROM tbl01ElementoCostos a, tbl01ElementoCostosCategoria b WHERE a.elementocostoscategoriarowid=b.rowid" runat="server">
                                    </asp:SqlDataSource>

I need to render the "<br />" tag generated by the sqldatasource. I see the text <br /> in the grid, instead of the break.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2011, 06:29 AM
Hello,

Try setting HtmlEncode="false"  to the Grid Column.
Hope it helps.

Thanks,
Shinu.
Tags
Grid
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or