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

How to display and get value in grid, where text has all special characters

2 Answers 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nirav
Top achievements
Rank 1
Nirav asked on 24 Jul 2014, 03:34 PM
Hi,
I am using VS 2013, Telerik.Web.UI Version 2014.2.618.45, developing a website using UI for ASP.Net AJAX telerik Q2 2014 controls. 
I have radgrid and binding columns to radgrid. 

Now, the problem is while binding and retrieving value of column containing special characters. 
Lets say one of the column has value as "Test &nbsp; test <br /> test ' test " test <asp:Label  Test \n test \\n test". 
I made this value to test. I want to display this in grid and also, I need to fetch this in two events, ItemDataBound and ItemCommand.
I tried various methods like HTMLEncoding, replacing characters and also tried putting label control inside ItemTemplate but could not retrieve value as it is.

So what I am looking for is, 
To display and retrieve data value "Test &nbsp; test <br /> test ' test " test <asp:Label  Test \n test \\n test" and "Test line 1 \r\n test line 2 \r\n" which is stored using multiline textbox. 
1. Is it possible to handle both scenario together? like handle straight string and also handle multiline textbox value to display and retrieve as entered. 
2. How to display above value in grid perfectly as it is? Consider both the cases, first, its string as it is and second, possible that its stored using multiline textbox
3. How to display above value in telerik:GridBoundColumn and in <asp:Label control inside <telerik:GridTemplateColumn? 
4. How to retrieve above value from grid as it is, in ItemDataBound and ItemCommand events?

Thanks in advance, 
















2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 29 Jul 2014, 08:52 AM
Hi Nirav,

Please refer to the answer in the other thread that you have opened for the same issue:
On a side note, for both sides convenience and for better tracking purposes, please try to avoid opening duplicate threads for the same issue.

If any further questions arise, I suggest that we use the other thread.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Nirav
Top achievements
Rank 1
answered on 29 Jul 2014, 01:13 PM
Yes, I think by mistake I might have submitted twice while waiting. I also saw that somehow I posted this post twice. Sorry for that. I will try to delete this one. 

Thanks, 
Tags
Grid
Asked by
Nirav
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Nirav
Top achievements
Rank 1
Share this question
or