Hi,
I am using telerik Grid View and telerik RadAjaxPanel to display records in grid. But the description column is not displaying the records in new line where as when I click edit button the text is in new line. However I changed the text and pressed Enter Button from keyboard and then again typed some text. After clicking Update button. The text I entered is still appearing in single line.
It tried creating Functions and then called it on label. But i did n't worked.
Here is the code:
The Function I have used :
I am using telerik Grid View and telerik RadAjaxPanel to display records in grid. But the description column is not displaying the records in new line where as when I click edit button the text is in new line. However I changed the text and pressed Enter Button from keyboard and then again typed some text. After clicking Update button. The text I entered is still appearing in single line.
It tried creating Functions and then called it on label. But i did n't worked.
Here is the code:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" CssClass="TabGrid"><td style="width: 270px;" class="details" colspan="3"> <asp:TextBox ID="txt_description" runat="server" TextMode="MultiLine" Height="50" Width="500" AcceptsReturn="False" CssClass="inputtype" ></asp:TextBox> <asp:RequiredFieldValidator ID="req_first_name" runat="server" ControlToValidate="txt_description" ValidationGroup="_basic" Display="Dynamic" ErrorMessage="<br>Description Required"></asp:RequiredFieldValidator> <asp:Label ID="lbl_description" runat="server" Text='<%# FixCrLf(Eval("postEventFeedback")) %>' ></asp:Label> </td> </telerik:RadAjaxPanel>The Function I have used :
Protected Function FixCrLf(value As String) As String If String.IsNullOrEmpty(value) Then Return String.Empty Return value.Replace(Environment.Newline, "<br />") End Function