ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: msdnweixiao on December 02, 2020, 11:04:51 am

Title: how to set multiple cell border color
Post by: msdnweixiao on December 02, 2020, 11:04:51 am
when i selected multiple cell, then how to change border's color ?

not the cell color , is the selected area's border color.

thank you.
Title: Re: how to set multiple cell border color
Post by: paramvir on December 02, 2020, 02:28:48 pm
This sets the border of all cells in the Selection.

Code: [Select]
var Sel = grid.Selection();
Sel.style("border-top", "1px solid red")
Sel.style("border-right", "1px solid red")
Sel.style("border-bottom", "1px solid red")
Sel.style("border-left", "1px solid red")
Title: Re: how to set multiple cell border color
Post by: msdnweixiao on December 07, 2020, 07:00:03 am
i use it ,but it not worked.

i want to set the border of selection, not the border of all cells in selected area;
Title: Re: how to set multiple cell border color
Post by: paramvir on December 07, 2020, 12:37:12 pm
To apply border to Selection edges only, you can divide Selection object edges into 4 Range objects and apply border to those Range objects.

For code reference, I've added Border -> All Selection edges item in the context menu in this example:

https://paramquery.com/pro/demos/import-xlsx