ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: eloan on July 05, 2017, 08:05:05 am

Title: Is there a way to make dataMap reflected by a dataModel?
Post by: eloan 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.
Title: Re: Is there a way to make dataMap reflected by a dataModel?
Post by: paramvir 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.
Title: Re: Is there a way to make dataMap reflected by a dataModel?
Post by: eloan 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.