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] Is there capability to have Formula Row, which presents value/text of the selected cell for ease of Row, like Excel/Google Sheet? #6267

Closed
2 tasks done
avidear opened this issue Sep 23, 2022 · 8 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Editing Related to the data grid Editing feature new feature New feature or request status: waiting for author Issue with insufficient information support: question Community support but can be turned into an improvement

Comments

@avidear
Copy link

avidear commented Sep 23, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Is there the capability to have Formula Row, which presents the value/text of the selected cell for ease of Row, like Excel/Google Sheet?

Expected behavior 🤔

Capability like Excel.

Steps to reproduce 🕹

Link to live example:

Steps:
1.
2.
3.
4.

Context 🔦

No response

Your environment 🌎

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

Order ID 💳 (optional)

No response

@avidear avidear added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 23, 2022
@avidear
Copy link
Author

avidear commented Sep 23, 2022

Ease of editing

@cherniavskii
Copy link
Member

Hey @avidear
No, the Data Grid does not offer formulas during editing.
You can set predefined "formulas" using valueGetter and valueSetter to compute values - see https://mui.com/x/react-data-grid/editing/#value-parser-and-value-setter

@cherniavskii cherniavskii added support: question Community support but can be turned into an improvement component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request feature: Editing Related to the data grid Editing feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 23, 2022
@avidear
Copy link
Author

avidear commented Sep 24, 2022

I do not need formulas - only something similar to an Excel formula bar, where I can more easily edit Text, Not using any numeric values only text values.
Please let me know if my requirement is clear and if there is an easier/supplemental way of editing text in a cell.

@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Sep 27, 2022

@avidear, if I understand you correctly, you'd like to have a text input above the column headers, that edits the value of whichever cell is on focus. Correct?
I'm curious to understand more about why you would need it; what's the problem you're trying to solve?

If that's your case, perhaps you could implement this feature using the onCellFocusIn (which is currently missing on the API). I believe that with a callback onCellFocus, you can change a custom TextInput to target the row and field given by the event, and update your data directly.

@cherniavskii
Copy link
Member

@avidear you can also find our Multiline Editing demo useful https://mui.com/x/react-data-grid/recipes-editing/#multiline-editing

@flaviendelangle flaviendelangle changed the title Is there capability to have Formula Row, which presents value/text of the selected cell for ease of Row, like Excel/Google Sheet? [data grid] Is there capability to have Formula Row, which presents value/text of the selected cell for ease of Row, like Excel/Google Sheet? Oct 17, 2022
@m4theushw
Copy link
Member

I created a demo in #6567 showing how to use the cell selection feature (not released yet) to implement this use case. See https://deploy-preview-6567--material-ui-x.netlify.app/x/react-data-grid/selection/#controlled-cell-selection

@cherniavskii cherniavskii added the status: waiting for author Issue with insufficient information label Dec 15, 2022
@cherniavskii
Copy link
Member

@avidear could you check if #6267 (comment) is what you are looking for? Thanks!

@github-actions
Copy link

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

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! feature: Editing Related to the data grid Editing feature new feature New feature or request status: waiting for author Issue with insufficient information support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

4 participants