How to remove shape’s outline GridJS

How to remove shape outline.
I attach file
image.png (6.9 KB)

@duyhai08
can you please provide your spreadsheet file

1 Like

I attach file
test file view gridjs.zip (1.6 MB)
When view shape will render image:
image.png (1.8 KB)

@duyhai08

It is better to still leave the outline in the UI,
so that the user can select it for editing operations.
For example, he can double-click the textbox shape to edit the text inside.
Otherwise, he may not be able to find the shape.
However, you can remove any unnecessary shapes before dealing with GridJs
below is the example code:

 public ActionResult DetailFileJsonWithUid(string filename,string uid)
        {
            String file = Path.Combine(TestConfig.ListDir, filename);
            GridJsWorkbook wbj = new GridJsWorkbook();
            //check if already in cache
           StringBuilder sb= wbj.GetJsonByUid(uid, filename);
            if(sb==null)
            {
                Workbook wb = new Workbook(file);
               //here we will remove any unnecessary shape
                int size = wb.Worksheets[0].Shapes.Count;
                for (int i=size-1;i>=0;i--)
                { Shape sp = wb.Worksheets[0].Shapes[i];
                    if (sp is TextBox && string.IsNullOrEmpty(sp.Text))
                    {//textbox with no text inside
                        wb.Worksheets[0].Shapes.RemoveAt(i);
                    }
                    if (sp.Line.FillType==FillType.None&&sp.Fill.FillType==FillType.None)
                    {//shape with nothing fill 
                        wb.Worksheets[0].Shapes.RemoveAt(i);
                    }
                   //...etc ,any thing you think it should not appear in UI
                   
                }

                wbj.ImportExcelFile(uid, wb);
                sb = wbj.ExportToJsonStringBuilder(filename);
            }

@duyhai08
Per my further investigation, the workaround code cannot fulfill your requirement. I think we should draw as in MS-Excel. I’ve created two tickets: one to support filtering out unnecessary shapes in the UI, and one to support drawing shapes with no line outline.

Issue ID(s): CELLSGRIDJS-1209,CELLSGRIDJS-1210

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as CELLSGRIDJS-1209) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi