Hello,
i have a question.
It is possible to enter in a gridbound column,when editing, html tags like
John<form> and take the whole sentence as it is,a literal.We need any kind of solution for our problem.
Best Regards,
Daniel
P.S:we would appreciate a response as soon as possible.
i have a question.
It is possible to enter in a gridbound column,when editing, html tags like
John<form> and take the whole sentence as it is,a literal.We need any kind of solution for our problem.
Best Regards,
Daniel
P.S:we would appreciate a response as soon as possible.
4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 14 Feb 2013, 07:36 AM
Hi,
It is possible to enter the Html tags in GridBoundColumn while editing. Please set the <httpRuntime requestValidationMode="2.0"/> configuration inside the Web.config and set the
HtmlEncode property of the GridBoundColumn to show the value inside the Grid.
ASPX:
Thanks,
Shinu.
It is possible to enter the Html tags in GridBoundColumn while editing. Please set the <httpRuntime requestValidationMode="2.0"/> configuration inside the Web.config and set the
HtmlEncode property of the GridBoundColumn to show the value inside the Grid.
ASPX:
<
telerik:GridBoundColumn
UniqueName
=
"ShipName"
DataField
=
"ShipName"
HtmlEncode
=
"true"
></
telerik:GridBoundColumn
>
Thanks,
Shinu.
0

Daniel
Top achievements
Rank 1
answered on 14 Feb 2013, 09:26 AM
we want the exact result as in this link at the end
http://http//www.asp.net/whitepapers/request-validation
to see and enter an html instruction as it is,validation we will do it manually.
so when i press edit for a row if i enter Nancy<f> ,show Nancy<f> and also save back and show Nancy<f> not < and >
i put in <system.web> the <httpRuntime requestValidationMode="2.0"/>
in page i disabled requestValidation=false
and for the boundcolumn i put the HtmEncode=true,and still don't work .
the diference between the link and here is that here is set the HtmlEncode=true,in the link is used the Server.HtmlEncode inside code.
Regards
http://http//www.asp.net/whitepapers/request-validation
to see and enter an html instruction as it is,validation we will do it manually.
so when i press edit for a row if i enter Nancy<f> ,show Nancy<f> and also save back and show Nancy<f> not < and >
i put in <system.web> the <httpRuntime requestValidationMode="2.0"/>
in page i disabled requestValidation=false
and for the boundcolumn i put the HtmEncode=true,and still don't work .
the diference between the link and here is that here is set the HtmlEncode=true,in the link is used the Server.HtmlEncode inside code.
Regards
0
Accepted
Hi Daniel,
You can use GridTemplateColumn, place an asp:TextBox inside and do the HTML encoding manually if you like. You can handle the ItemDataBound event of the grid to change the text inside the textbox and ItemInserting ItemUpdating to change the value before updating it to the database.
If you use HtmlEncode="true", the HtmlEncode is used internally in the RadGrid code when populating the values.
Kind regards,
Vasil
the Telerik team
You can use GridTemplateColumn, place an asp:TextBox inside and do the HTML encoding manually if you like. You can handle the ItemDataBound event of the grid to change the text inside the textbox and ItemInserting ItemUpdating to change the value before updating it to the database.
If you use HtmlEncode="true", the HtmlEncode is used internally in the RadGrid code when populating the values.
Kind regards,
Vasil
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.
0

Daniel
Top achievements
Rank 1
answered on 19 Feb 2013, 07:40 AM
ok,thank you for the informations.