ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: luckduck on July 24, 2019, 09:57:32 am

Title: paste row set value hidden column
Post by: luckduck on July 24, 2019, 09:57:32 am
Hi,

Will the values be set only for visible columns when pasting?

I want to set the value in the hidden column of the line I added by paste in the tree grid.

Title: Re: paste row set value hidden column
Post by: paramvir on July 25, 2019, 08:47:20 am
Values are pasted in hidden columns too.
Title: Re: paste row set value hidden column
Post by: luckduck on July 25, 2019, 01:21:14 pm
Thanks you very much for your reply.

I do not want to paste the data in the entire column, but I want to paste some column data and set the values in the remaining columns.

Title: Re: paste row set value hidden column
Post by: paramvir on July 25, 2019, 01:50:41 pm
Sorry I don't get your question. Could you please elaborate it.

What are the values in the clipboard?

Values are pasted on the destination columns depending upon the number of columns in the clipboard and number of selected columns. In your screenshot, only first column is selected, hence values are pasted in that column only.
Title: Re: paste row set value hidden column
Post by: luckduck on July 25, 2019, 02:26:49 pm
I copied and pasted only the item "ITEM" as shown in the screenshot, and I want to create the key "groupCd" item as a separate logic.

1. Copy ITEM items from Excel.
2. Paste it into the ITEM column of the grid.
3. Grid rows are added as much as the pasted ITEM.
4. The values of other columns in the pasted row are automatically set according to the value of "ITEM".

Can I use "paste" or "beforePaste" to set values in columns like "updateRow"?
Title: Re: paste row set value hidden column
Post by: paramvir on July 25, 2019, 03:39:20 pm
oh ok, got your question.

Dependencies between columns can be setup easily with js formulas.

Please check this demo:

https://paramquery.com/pro/demos/grid_formula

Values in formula columns are automatically updated, no need of beforePaste, paste events.
Title: Re: paste row set value hidden column
Post by: luckduck on July 25, 2019, 04:23:03 pm
I solved the problem thanks to you.