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

How to resize a single row in Qgrid and add 2 line texts? #824

Closed
HariniMadhi opened this issue Jul 27, 2023 · 2 comments
Closed

How to resize a single row in Qgrid and add 2 line texts? #824

HariniMadhi opened this issue Jul 27, 2023 · 2 comments

Comments

@HariniMadhi
Copy link

I want to write a few lines in the rows of qgrid, but want them to appear in separate lines, similar to Alt+Enter in Excel.

import pandas as pd
import qgrid
from IPython.display import display

df = {'Name': ['John', 'Joseph'], 'Introduction': ['Hi! I\'m John. I am an animal lover and play guitar. [some more stuff to make this long enough]', 'Hello! I\'m Joseph. I\'ve moved across continents to attend this school. [some more stuff to make this long enough]'], 'Age': [20, 21]}
grid = qgrid.show_grid(pd.DataFrame(df))

display(grid)

In this, I'd want to have 'Hi! I'm John' in line one of the cell, and 'I am an animal lover and play guitar.' in the second line of the same cell, and some more if I want to add in the third lines of the same cell. Is this possible?

@HariniMadhi
Copy link
Author

Does anyone know if this feature exists, or knows a workaround for this?

@ghiscoding
Copy link
Collaborator

ghiscoding commented Jul 27, 2023

Looks like you're asking in the wrong project, the project here is SlickGrid not QGrid, so you should probably ask this question on QGrid GitHub or on Stack Overflow. QGrid might be based on SlickGrid but we have no direct relation to QGrid, and for us maintainers, we simply have never used QGrid neither python and I'm afraid that we cannot help you for that reason... sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants