Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    When do listgrid fields get converted to the type defined by the datasource?

    I'm using `saveLocally` which states that I should be using `setData` instead of `fetchData`.
    Which is working fine aside from my fields that are defined as dates are not being converted from strings to js dates.

    How is data modified when a listgrid calls fetch data? Is there a method on the listgrid or datasource I can run the send request data through to fix dates?

    Thank you

    SmartClient version (available on lower left of Developer Console)
    SmartClient Version: v11.0p_2017-02-16/Pro Development Only (built 2017-02-16)

    #2
    Untyped data such as XML or JSON is parsed and converted to proper types as the data is received by a DataSource from the server.

    If you are doing something like cutting and pasting a JSON structure into your code where all values are Strings, you would create this problem.

    If the structure is instead received from the server via a DataSource before you apply it to the grid via setData(), you won't have a problem.

    Comment

    Working...
    X