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

[data grid] Can I add a logo to the print export in DataGrid Premium? #14916

Closed
mahammahmood opened this issue Oct 10, 2024 · 4 comments
Closed
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: extend Logic customizability feature: Export status: waiting for author Issue with insufficient information support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@mahammahmood
Copy link

mahammahmood commented Oct 10, 2024

The problem in depth

I want to add a logo to the print export. Is this possible? If yes, could you please provide a solution? Below is my sample print export.
Screenshot 2024-10-11 023651

Your environment

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

Search keywords: Data ,Grid , Premium, GridToolbarExport, GridPrintExportOptions
Order ID: 91010

@mahammahmood mahammahmood added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Oct 10, 2024
@github-actions github-actions bot added the support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ label Oct 10, 2024
@michelengelen michelengelen changed the title Can I add a logo to the print export in DataGrid Premium? [data grid] Can I add a logo to the print export in DataGrid Premium? Oct 11, 2024
@michelengelen michelengelen added component: data grid This is the name of the generic UI component, not the React module! feature: Export customization: extend Logic customizability labels Oct 11, 2024
@michelengelen
Copy link
Member

Well, you could potentially use a media query to show a pseudo element with a background image in your page, or you insert an image somwehere that does only show with a media query setting to print. Modify the data grid style

@michelengelen michelengelen 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, 2024
@mahammahmood
Copy link
Author

Can you provide the code to insert an image in the DataGrid? The provided link only shows how to insert color.

@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 11, 2024
@MBilalShafi
Copy link
Member

MBilalShafi commented Oct 15, 2024

@mahammahmood, @michelengelen meant to do something like https://stackblitz.com/edit/react-xkpqnn?file=Demo.tsx

image

Be sure to have the "Print backgrounds" (Firefox) and Background graphics (Chrome) option on in the Print dialog.

Firefox:
image

Chrome:
image


Side note: Please try to have the general questions like how to set a background using CSS etc answered using platforms like Stack Overflow which are specific for such problems and keep mui-x repo as relevant to issues specific to our products. Thanks 🙏

@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 Oct 15, 2024
Copy link

The issue has been inactive for 7 days and has been automatically closed.

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! customization: extend Logic customizability feature: Export status: waiting for author Issue with insufficient information support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

3 participants