4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 10 Sep 2009, 10:30 AM
Hi Milosz,
Try using:
< - for less-than
>- for greater-than
i.e. use < some text > instead of <some text> and see whether you are able to display the desired cell text.
Princy
Try using:
< - for less-than
>- for greater-than
i.e. use < some text > instead of <some text> and see whether you are able to display the desired cell text.
Princy
0
Milosz
Top achievements
Rank 1
answered on 10 Sep 2009, 10:36 AM
ok but i bind grid with datasource, i could use HttpUtility.HtmlEncode but do i have to iterate for each cell to modyfi text? if so how to iterate every column in itemdatabound event using GridDataItem?
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Sep 2009, 11:37 AM
Hi,
Give a try with the following code snippet to loop through the entire cells of a Grid.
CS:
Shinu
Give a try with the following code snippet to loop through the entire cells of a Grid.
CS:
| protected void RadGrid2_PreRender(object sender, EventArgs e) |
| { |
| foreach (GridDataItem item in RadGrid2.MasterTableView.Items) |
| { |
| foreach (GridColumn col in RadGrid2.MasterTableView.RenderColumns) |
| { |
| string strtxt = item[col.UniqueName].Text.Replace(">", ">"); |
| string strtxt1 = strtxt.Replace("<", "<"); |
| item[col.UniqueName].Text = strtxt1; |
| } |
| } |
| } |
Shinu
0
Milosz
Top achievements
Rank 1
answered on 21 Sep 2009, 10:53 AM
hi, it's me again
issue descriped above works in IE, but unfortunately not in Firefox, what can solve this problem?
issue descriped above works in IE, but unfortunately not in Firefox, what can solve this problem?