ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: zhouqi on July 15, 2021, 06:55:42 pm

Title: How to select the whole column by colIndx ?
Post by: zhouqi on July 15, 2021, 06:55:42 pm
Hello,

I want to set the whole column selection state by colIndx.

I use 
Code: [Select]
grid.setSelection({colIndx: 1})   function to select the column, but it occur error, it must has rowIndx property.

When I use 
Code: [Select]
grid.setSelection({rowIndx: 0, colIndx: 1}) function, it only select the body data cell[0,1]  not the whole column.

How to select the whole column by colIndx ?

Title: Re: How to select the whole column by colIndx ?
Post by: paramvir on July 15, 2021, 09:29:38 pm
Documentation of setSelection says "Selects a row or cell depending upon the parameters."

Please use Range object to select a column.

Code: [Select]
grid.Range({c1: 1}).select();

https://paramquery.com/pro/api#method-Range
Title: Re: How to select the whole column by colIndx ?
Post by: zhouqi on July 16, 2021, 06:29:10 am
Thanks,  it's ok  :)