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

The grid shows empty columns

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saurabh
Top achievements
Rank 1
Saurabh asked on 29 Oct 2012, 01:51 PM
In the grid whenever text within the tags is saved it is not visible in the data bound columns.

Ex. If this text <Coffee> is bound to the data column then it does not appear in the column , rather a blank space appears.

(This may be probably as while rendering its considering text as a tag as its b/w tags <>)

What can be the potential fix for this issue?

(I guess similar issue persist in this site in demo of grids. Inline Editing of grid columns. [on saving <Tea> as column value value does not save])

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 01 Nov 2012, 07:40 AM
Hello,

 In the cases where the text that you need to show contains special symbols interpreted by the browsers as HTML (such as "<", ">", "&" etc. ) you need to use the HtmlEmcode method to encode the text so that it is shown properly in the browser. You can do so for example in the ItemDataBound event of the grid where you can access the text through the text property of the cell: item["column name"].Text.

Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Saurabh
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or