mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.97k forks source link

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

Open HariniMadhi opened 1 year ago

HariniMadhi commented 1 year ago

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?

6pac commented 1 year ago

I think you're not only in the wrong project -this is slickgrid, but even if this were the right project it's an old and dead repo. It's now at https://github.com/6pac/SlickGrid/wiki