jQuery UI Widgets Forums TreeGrid getRow for Keys containing '/' character

This topic contains 4 replies, has 2 voices, and was last updated by  vankin09 9 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • vankin09
    Participant

    Hi,

    I am currently facing an issue with treegrid. Please find below the jsfiddle link to an example.
    http://jsfiddle.net/vankin09/dqcL8h82/

    My use case requires the key/uid to contain ‘/’ character.
    The issue I am facing while doing it is that I am unable to retrieve the record using getRow API. Even updateRow doesn’t work since it internally calls getRow. The below command fails.


    alert($("#treeGrid").jqxTreeGrid('getRow',"Janet/J").FirstName);

    However, when i make the same call with ‘/’ removed while searching for the same data it succeeds.
    <strong>alert($("#treeGrid").jqxTreeGrid('getRow',"JanetJ").FirstName);</strong>

    Also, on debugging I found that ‘/’ is removed from the datafield and stored as the key.
    Can you please help me to know if this is the desired behavior or is it a bug in the grid.

    jQuery : 1.9
    Browser : Google Chrome Version 44.0.2403.157 m
    jQWidgets : 3.8.2
    Device : PC

    Thanks,
    VaNKiN


    ivailo
    Participant

    Hi VaNKiN,

    Please try to use normal ids (without slashes).
    About your code also is better to use EmployeeID about these purposes.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    vankin09
    Participant

    Hi Ivailo Ivanov,

    Thanks for the quick response.
    Using normal ids[numbers] will certainly solve the problem, but all my use cases require this String Value as input and it may contain ‘/’.

    I have the following questions regarding the issue :
    Please help me know if imposing such restrictions is required?
    Will such keys break other functionalities?
    If this is not an issue and intentionally imposed, can you let me know if there is a workaround i can use for my implementation.

    Thanks,
    VaNKiN


    ivailo
    Participant

    Hi VaNKiN,

    Unfortunately we don’t have a workaround about this situation.
    Better do not set this id in your source object.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    vankin09
    Participant

    Hi,

    Thank you.
    I found a workaround, not sure if it will work. I am using base 64 encoded string of the input string.
    That will take care of removing all the special characters and still be able to generate unique uids for the grid.

    Regards,
    Rajesh

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.