Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3790
using dataSource with a json layout but making consecutive keys.
posted

I have a grid set up using json data.

This basically gives my keys matching text values for my columns. What I want to do is force all keys to be sequential numbers. Its ok if it has to be strings as long as they are numbers. How can I achieve this?

  • 23953
    Verified Answer
    Offline posted

    Hello Seang,

     

    I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

    support@infragistics.com

  • 23953
    Offline posted

    Hello Seang,

    Thank you for posting in the community.

    You have 2 options to create column definitions with sequential keys:

    Option 1: Create the column collection with iteration construct (for example: for iterator) prior to initializing igGrid.

    Option 2: Use the autoGenerateColumns option and set it to true.

    Attached you can find sample demonstrating both approaches.

    Do not hesitate to  contact me if you have any additional questions.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

    support@infragistics.com

    igGrid_consecutive_keys.zip