Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Not working for master/detail #10505

Closed
lisaWriteJava opened this issue Sep 28, 2023 · 15 comments
Closed

Exporting Not working for master/detail #10505

lisaWriteJava opened this issue Sep 28, 2023 · 15 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! support: commercial Support request from paid users

Comments

@lisaWriteJava
Copy link

lisaWriteJava commented Sep 28, 2023

The problem in depth 🔍

Hello,

As you can see here: https://codesandbox.io/s/ph2c4r?file=/Demo.js the values in the master/details doesn't print. How can I get this to work.

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: export master detail
Order ID: 66765

@lisaWriteJava lisaWriteJava added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users support: unknown Support request type not verified yet. Head to https://tools-public.mui.com/prod/pages/jyhs86t labels Sep 28, 2023
@github-actions
Copy link

You have created a support request under the "Priority Support" terms, which is a paid add-on to MUI X Premium ⏰. Please validate your support key using the link below:

https://tools-public.mui.com/prod/pages/jyhs86t?repo=mui-x&issueId=10505

Do not share your support key in this issue!

Priority Support is only provided to verified customers. Once you have verified your support key, we will remove the support: unknown label and add the support: priority label to this issue. Only then the time for the SLA will start counting.

@MBilalShafi
Copy link
Member

@lisaWriteJava Thank you for using MUI X Data Grid.

Could you elaborate more on the problem you are facing? Sharing a screen record showing the issue will help.

For a test, I tried the codesandbox link attached in the issue and Print works for me in both Firefox and Chrome, the screenshots are attached!

Firefox:
image

Chrome:
image

Thank you!

@MBilalShafi MBilalShafi added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 28, 2023
@lisaWriteJava
Copy link
Author

I apologize, I sent the wrong sandbox, https://codesandbox.io/s/ph2c4r?file=/Demo.js is the correct one. So the first column doesn't export the one with the +, it starts from order id. I tried renderHeader and still it wouldn't export.

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Sep 28, 2023
@MBilalShafi
Copy link
Member

Ah ok so you mean the column with the + icons for expansion of the master detail panel, it's the intended behavior to not make it part of print export, as it couldn't be further interacted with so doesn't make a lot of sense to make it part of the exported table.

Let me know if you have further questions.

@MBilalShafi MBilalShafi added the status: waiting for author Issue with insufficient information label Sep 29, 2023
@lisaWriteJava
Copy link
Author

ahh we had a client that wants to use that master detail (+) column to show/hide a component that may have a lot of data like hundreds of lines. Since it wouldn't look well in a table, we were going to show/hide a card with this information but want to export the info with a print or excel export. Is this achievable. Maybe the approach to do it is wrong and if so what would be the best way to implement this?

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Sep 29, 2023
@MBilalShafi
Copy link
Member

Can you share a minimal demo of the current approach being used and the intended behavior in a codesandbox example, it will help us understand the issue and suggest a better solution.

@MBilalShafi MBilalShafi added the status: waiting for author Issue with insufficient information label Sep 29, 2023
@lisaWriteJava
Copy link
Author

lisaWriteJava commented Sep 29, 2023

Here's a sandbox: https://codesandbox.io/s/zen-smoke-lmnccz?file=/Demo.js I mocked up the first column (+) to show /hide details passed to it. I could make it a larger list but, it would be the same idea.

I didn't attempt to put it in a cell like the other data since it would look awful to the user. But if there is a way it can go into a cell but only display like master detail that could work too.

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Sep 29, 2023
@MBilalShafi
Copy link
Member

Following your example, I can export the card just fine (without the +/- icons which obviously don't make sense as they won't be interactive in the PDF/printed version)
image

Are you having difficulties in getting a result similar to one I attached above?

@MBilalShafi MBilalShafi added component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information labels Oct 1, 2023
@lisaWriteJava
Copy link
Author

lisaWriteJava commented Oct 5, 2023

so what the user has asked is to be able to export the hidden data when I do an export to csv or excel. It can stay hidden in the table but be exportable. I understand that print is available but they'd like the same info to be exported to excel
@MBilalShafi

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Oct 5, 2023
@lisaWriteJava
Copy link
Author

lisaWriteJava commented Oct 10, 2023

It is possible for the hidden data to be able to be exported on a csv or excel export? It's not goign to be somethign they need to fetch but it's just so large it should be shown in the initial grid @MBilalShafi

@MBilalShafi MBilalShafi added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 10, 2023
@romgrk
Copy link
Contributor

romgrk commented Oct 11, 2023

I don't think that we support that use-case. What do you mean by hidden data?

You've opened this issue as a Priority Support issue but haven't confirmed your support key. Is this a Priority Support issue?

@romgrk romgrk added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 11, 2023
@lisaWriteJava
Copy link
Author

lisaWriteJava commented Oct 12, 2023

@romgrk The support key is 66765. So when I say hidden data, I mean the data from details. I'd like that to be able to be exported also but not shown unless we click to show that data on the screen.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 12, 2023
@romgrk
Copy link
Contributor

romgrk commented Oct 12, 2023

It's not possible to do that for now, the hidden data from details panel is not data formatted in a way the datagrid can use, it's HTML. If you want to add that feature, I would suggest that:

  • You look into row grouping, and group the additional data that you want to export as children of each of your rows.
  • Write the export logic yourself, you'll be free to customize however you want.

@romgrk romgrk added status: waiting for author Issue with insufficient information and removed support: unknown Support request type not verified yet. Head to https://tools-public.mui.com/prod/pages/jyhs86t status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 12, 2023
@lisaWriteJava
Copy link
Author

Great thanks so much. I appreciate the assistance. This is help greatly in explaining our strategy to the customer.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 12, 2023
@romgrk
Copy link
Contributor

romgrk commented Oct 13, 2023

👍

@romgrk romgrk closed this as completed Oct 13, 2023
@romgrk romgrk removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! support: commercial Support request from paid users
Projects
None yet
Development

No branches or pull requests

3 participants