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

[DataGrid] How to change the value of non-editable cells onCellClick #10975

Closed
WiXSL opened this issue Nov 9, 2023 · 2 comments
Closed

[DataGrid] How to change the value of non-editable cells onCellClick #10975

WiXSL opened this issue Nov 9, 2023 · 2 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

@WiXSL
Copy link
Contributor

WiXSL commented Nov 9, 2023

The problem in depth 🔍

I'm rendering a DataGridPremium component with non-editable cells,
What I want is, when the user clicks on a cell, if the value of that cell is, lets say "1", to set the value of that cell to '0' programmatically.

I've tried with apiRef.current.setEditCellValue without success.
I don't know how to go about this.

Thank you.

Your environment 🌎

`npx @mui/envinfo`
 System:
    OS: Windows 11 10.0.22621
  Binaries:
    Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.6.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (119.0.2151.44)
  npmPackages:
    @emotion/react:  11.10.5 
    @emotion/styled:  11.10.5 
    @mui/base:  5.0.0-beta.21 
    @mui/core-downloads-tracker:  5.14.15 
    @mui/icons-material: ^5.14.15 => 5.14.15 
    @mui/material: ^5.14.15 => 5.14.15 
    @mui/private-theming:  5.14.15 
    @mui/styled-engine:  5.14.15 
    @mui/styles: ^5.14.15 => 5.14.15 
    @mui/system:  5.14.15
    @mui/types:  7.2.7
    @mui/utils:  5.14.15
    @mui/x-charts: ^6.0.0-alpha.14 => 6.0.0-alpha.14
    @mui/x-data-grid: ^6.17.0 => 6.17.0
    @mui/x-data-grid-premium: ^6.17.0 => 6.17.0
    @mui/x-data-grid-pro:  6.17.0
    @mui/x-date-pickers: ^6.17.0 => 6.17.0
    @mui/x-license-pro: ^6.10.2 => 6.10.2
    @types/react:  18.0.28
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0

Search keywords: DataGrid cells onCellClick
Order ID: 67568

@WiXSL WiXSL added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Nov 9, 2023
@romgrk
Copy link
Contributor

romgrk commented Nov 9, 2023

@romgrk romgrk 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 and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 9, 2023
@WiXSL
Copy link
Contributor Author

WiXSL commented Nov 9, 2023

Wow, that was fast!
Thank you, you are right
It was that simple

@WiXSL WiXSL closed this as completed Nov 9, 2023
@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 Nov 9, 2023
@MBilalShafi MBilalShafi removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 10, 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