Get KoolPHP UI with 30% OFF!

row.getDataItem() URL Encoding bug with new version of KoolGrid

Keyur
I am trying the koolgrid update as it says "Fix decode utf-8 in row.getDataItem()"
I have a grid with user's details and when i select a row I use row.getDataItem() to get user's email address and other details to populate a form. Until I tried using this new grid update the email address was displaying fine, but with this new version it shows "keyur%40zenlo.co.uk" looks like URL encoding bug.
Posted Jan 12, 2016 Kool
Anthony Amolochitis
I have emails display all the time in my grid. Could you copy and paste that into the form? I want to try and see if I get it too. I wonder if it's a special character in the email, or if it's a bug. I don't want to run into the issue too. Thanks Keyur.
Posted Jan 12, 2016 Kool
Keyur
Hi Anthony
Emails are displaying fine on grid but when i use row.getDataItem() to get grid's data to populate HTML form it's displayed as URL Encoded.
I tried what you said and it's coping correct data but that's not the solution the problem is with row.getDataItem()
Posted Jan 12, 2016 Kool
Anthony Amolochitis
Did you try doing a URI decode on the data you got back from row.getDataItem()?
W3 Schools has an example of it. It could just be encoded.
http://www.w3schools.com/jsref/jsref_decodeuricomponent.asp
I just did the url decode on the string "keyur%40zenlo.co.uk" and the output was "keyur@zenlo.co.uk"
You can try it at : http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_decodeuricomponent
Javascript function is : decodeURIComponent()
Posted Jan 17, 2016 , edited Jan 17, 2016 Kool
Keyur
Yes I did and it works but it's not the ideal solution as I am using KoolGrid all over the place in my website and don't want to change the code every where.
Posted Jan 18, 2016 Kool
Anthony Amolochitis
Maybe the developers at KoolPHP can add a method to their javascript to do the url decoding automatically. Since we discovered what the issue was, there isn't really a search for a problem anymore, now only a solution exists.
Posted Jan 18, 2016 Kool
Keyur
Well I did tell them about this bug and they tried twice to fix this bug and send me latest version of koolgrid.php but they failed to fix it both time. Bit Shame
Posted Jan 18, 2016 Kool