Hi Team,
We are migrating 12.2 sample to 14.1. In web hierarchical data grid the expand symbol is not coming when no rows are binder in chlild band. But it is working perfectly in IG12.2.
Our requirement is to have a the parent grid in one level and on expamd click ajax call is made to get the data from database and will bind the data to child level using client elements rowexpanding.
In the sample last row has no child band atached to it, so the expend button is not viisible.
Please review and advise.
We want the expand symbol to be attached to every row irrespective of the child row availability.
Regards,
Ahmed.
Hi Infragistics,
Could you please advise on above issue.
Ahmed
Dear Ahmed Shaik,
Thanks for using Infragistics controls!
I believe adding following code may help you in order to resolve your issue.
protected void WebHierarchicalDataGrid1_InitializeRow(object sender, RowEventArgs e) { ((ContainerGridRecord)e.Row).IsEmptyParent = true; }
Hello Ahmed,
Here is the responce of questions:
1)IG 12.2 does not do HTMLEncode in a default way. But IG14.2 does. Is it a bug or enhancement?
4)How about this encode property effect on Bound and Unbound fields?
- This is an enhancement for WebDataGrid. In that way is preventing XSS. If you have any HTML, CSS or JS code, it can be executed and harm your application.
2)If I set HTMLEncode false in column level explicitly, will it impact my application performance?
- It won't impact the performance.
Hi,
Thanks for you response.
Because of this encoding feature I am facing some issues in IG14.2 grids,
1)Scenario 1
Having one bound field - id = "HidField1", index =0
One unbound field - id = "Field2", index= 1
I am assigning HidField1 to Field2
e.Row.Items[1].Text = e.Row.Items[1].Value;
Case (a)
When both Hidfield1 and Field2 are made HtmlEncode=false
In client side .get_value() for the field "Field2" is giving encoded value [ie At&T as AT&T]
Case (b)
Making "HidField1" only as HtmlEncode = false
In client side .get_value() for the field "Field2" is giving encoded value [ie At&T as AT&T]
case (c)
Assigning e.Row.Items[1].Value = e.Row.Items[1].Value;
Then .get_value() is giving [AT&T] but .get_text() is giving [At&T]
It is bit confusing.
In IG12.2 when we assign .Text in code behind, the client side code .get_text() and get_value() will give the same output. But it is behaving diffenent though I made HtmlEncode = false explicitly.
2)Scenario 2
I am having one Bound Field id="BoundField1" and HtmlEncode= false
I am re-asssigning At&T to .Text property in code behind by trimming the spaces.
But here also when I extract with .get_text() is returning "AT&T" instead of "AT&T".
Is there any way to overcome this side effect which makes my migration little complex.
What my need is like,
I want the text to be unencoded [AT&T] every where irrespective of how I am extracting it [ie .get_text(), get_value()].
Hi Ahmed,
Could you send me a sample project with configuration?
PFA,
I have added Encoding= false for the column "BB". Now when I try to extract the .Text or .Value of the coulmn "BB" in initialize row will give the proper string with '&' and not '&' as expected.
Steps to reproduce the issue:
On expanding the first row, it will give alert of .get_text() and .get_value() method for the coulmn named "BB". In that .get_text() gives '&' as '&'. However .get_value() gives the proper string with the symbol '&'. How to make it streamlined? Please advise.
I believe you could encode it with this JavaScript function -
This post might be helpful - http://es.infragistics.com/community/forums/p/95376/473914.aspx#473914
Best Regards,
The function escape replaces all occurrences of & < > html with their corresponding character: &, <, >
Here is the implementation - str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
That too did not work in our case.
decodeURIComponent does encoding in a different way and acts upon different special character. It does not match our set of character which all are encoded. Sowe wrote custom function which will be called for every extration of value from the fields in client side.
It would be helpful if you provide us what are all the character that will get encoded as a part of cross site scripting in IG14.2. So that we could frame the custom function in a better way.
Hello,
I am still following your case. Have you been able to resolve the issue?
If you have any concerns or questions, please feel free to contact me, I will be glad to help you.Thank you for choosing Infragistics components!
In that case you should use get_value().
Stanimir Todorov
I tried decodeURIComponent method but it did solve my issue. It is still extracted as AT&T INC instead of AT&T INC. Please help.
On lighter Note:
The encoding which is happening is HTMLEncode in my case rather than URLIEncode/Decode.