ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: posttelink on July 21, 2021, 07:33:04 am

Title: How to get Specific Cell Values
Post by: posttelink on July 21, 2021, 07:33:04 am
Hello, I'm asking you a question while implementing grid. I want to receive Excel from the user and spray it on the grid, and I want to receive values from specific cells such as a1, a2, a3, and a4 and process the data. Can you show me an example of how to do?
Title: Re: How to get Specific Cell Values
Post by: paramvir on July 21, 2021, 09:55:16 am
Use Range object: https://paramquery.com/pro/api#method-Range

Value of a specific cell i.e., a1 can be obtained as

Code: [Select]
var val = grid.Range( { r1: 0, c1: 0 } ).value()[0];

Value of a range of cells i.e., a1, a2, a3, a4 can be obtained in form of an array with

Code: [Select]
var arr = grid.Range( { r1: 0, c1: 0, r2: 3, c2: 0 } ).value();