Data Selection from AG Grid Column

Hi jinnyzor,
I have similar topic.
I have column in my grid that gathers some information from other columns and puts them together. My collegue needs to copy only this column. is there any easy solution for selecting column ?

Hello @acidkans,

Do you mean your colleague will always select the data from this column?

I dont understand why you would need to select the whole column if it is always going to be the same?

You could use text selection, though this doesnt work well with spanning rows.

Is it possible for you to provide an MRE for this use-case?

Hello,
my idea is to use filtering and copy whole column with filtered data…so it’s not going to be the same whole time…
the column I want to copy data from gets names, values and concatenate them.
Something like: " task accepted by “Frank” on 02.02.2024" where name and date is from other columns…
I use this column as description of invoices…

sorry what is MRE?

Sure, check out this explanation:

hi,
below definition of this column. besides node.data there are some Polish and German words…
this column gathers all data needed for invoice description…

columndefs=[
{'headerName': 'INVOICE DESCRIPTION',"wraptext":True,"filterParams":{"excelMode": "windows"},"autoHeight":True,
          'valueGetter':{"function": "params.node.rowPinned != 'bottom' ? 'Prace instalacyjne w tygodniu ' + params.data.week +' na stacji '+ params.data.site +', "   "zgodnie z zamówieniem '+params.data.po_number + ' / Installation Arbeiten am ' + params.data.site + ', gemacht in KW '+ params.data.week + '; gemaß der Bestellung '+params.data.po_number + '; akzeptiert am ' + params.data.acceptance_date + ' von ' + params.data.bauleiter : null;"}}]

If, you want to use AG Grid Enterprise, :money_mouth_face:, then you can use range selection and copy the data from there.

If, you dont want to use Enterprise, then you will need to be a little more creative in how you do it.

You could potentially create your own header and have a button that would loop through the filtered data using the api, building the copied column and adding it to string of text, then sending this string of text to the navigator clipboard.

1 Like

Another solution would be to use a regular button and update a dcc.Clipboard with the virtualRowData in a callback.

For this to work, you would need to update the data in the valueGetter so it includes the invoice description

2 Likes