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

xml string in database record is not displayed in full

3 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
hobbes_child
Top achievements
Rank 1
hobbes_child asked on 16 Jun 2010, 02:11 PM
I have a simple RadGrid bound to a DataTable retrieved from a SQL database with a simple "SELECT * FROM <table_name>" query.
One of the table's columns stores XML strings.

My problem is that the corresponding RadGrid column does not display the XML string itself; it displays only the XML element values one after another.

E.g.  say the database value in column X is:
    "<root><username>foo</username><password>bar</password></root>".
The RadGrid displays in its column X:
    "foo bar".

Is it possible for the RadGrid to show the actual XML string itself?

Many thanks.

3 Answers, 1 is accepted

Sort by
0
hobbes_child
Top achievements
Rank 1
answered on 18 Jun 2010, 10:25 AM
Can anyone help?  Do I have this in the correct forum?  Thanks.
0
Accepted
Tsvetoslav
Telerik team
answered on 21 Jun 2010, 11:35 AM
Hello,

You need to set the HtmlEncode property of the column to true.

Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
hobbes_child
Top achievements
Rank 1
answered on 21 Jun 2010, 11:41 AM
It works.  :)

Thank you Tsvetoslav.
Tags
Grid
Asked by
hobbes_child
Top achievements
Rank 1
Answers by
hobbes_child
Top achievements
Rank 1
Tsvetoslav
Telerik team
Share this question
or