@@ -33,10 +33,10 @@ pip install ej2-streamlit-grids
33
33
34
34
Follow the below steps to add the Syncfusion Grid component to the Streamlit application:
35
35
36
- 1\. Create a Python file named ** demo.py** and import the Grid component into the file:
36
+ 1\. Create a Python file named ** demo.py** and import the Grid component ( ` SfGrid ` ) into the file:
37
37
38
38
``` py
39
- from ej2_streamlit_grids import GridComponent , GridProps
39
+ from ej2_streamlit_grids import SfGrid , GridProps
40
40
```
41
41
42
42
2\. Create a ` CSV ` file named ** dataset.csv** and populate it with data in the following format:
@@ -55,7 +55,7 @@ OrderID, CustomerName, OrderDate, Freight, ShippedDate, ShipCountry
55
55
data = pd.read_csv(' dataset.csv' )
56
56
props = GridProps(data)
57
57
58
- GridComponent (props)
58
+ SfGrid (props)
59
59
```
60
60
61
61
## Import Syncfusion CSS styles
@@ -73,14 +73,14 @@ props.theme = 'https://cdn.syncfusion.com/ej2/22.1.34/fluent.css'
73
73
Here is the summarized code for the above steps in the ** demo.py** file:
74
74
75
75
``` py
76
- from ej2_streamlit_grids import GridComponent , GridProps
76
+ from ej2_streamlit_grids import SfGrid , GridProps
77
77
import pandas as pd
78
78
79
79
data = pd.read_csv(' dataset.csv' )
80
80
props = GridProps(data)
81
81
props.theme = ' https://cdn.syncfusion.com/ej2/22.1.34/fluent.css'
82
82
83
- GridComponent (props)
83
+ SfGrid (props)
84
84
```
85
85
86
86
Ensure that terminal is in the correct project directory where ** demo.py** is located. Run the application using the following command:
0 commit comments