Author Topic: Is there a way to make dataMap reflected by a dataModel?  (Read 2016 times)

eloan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Is there a way to make dataMap reflected by a dataModel?
« on: July 05, 2017, 08:05:05 am »
Hi,

I look at demo for https://paramquery.com/pro/demos/datamap.

The column of 'name', 'deliverytime' and 'unitprice can be changed by changing "Select Id" list.
When setting the value in dataModel, I'd like to make the value reflected.

ex. javascript:33 in demo
dataModel: { data: [{}, {}, {}, {}] }
  ↓
dataModel: { data: [{"id":"A1-B1-2"}, {}, {}, {}] }

"Edit and Run" is change the "Select ID" column only.
I'd like also to make a dataMap reflected in this case.
Are there any good advice?

Best regards.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Is there a way to make dataMap reflected by a dataModel?
« Reply #1 on: July 05, 2017, 10:39:46 pm »
dataMap is for inline editing only.

If you want to initialize dataModel.data from itemlist and column.editor.dataMap, you would need to write a custom function to do so. Please let me know if you need any assistance with that.

eloan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Is there a way to make dataMap reflected by a dataModel?
« Reply #2 on: July 06, 2017, 05:45:50 am »
I see.
dataMap could be settled by the way which isn't used, so this case became no problem.
Thank you very much for your correspondence.