Start a conversation

Programmatically selecting cells of an existing grid-view

 

Overview

 

Instead of setting the selected cells of a grid-view upon creation, if you wish to change the selection of cells of a grid-view that already exists, this article will help you to do so programmatically.

 


 

Information

You can programmatically change the selected cells of an existing grid view using either of the following two system procedures: 

    1. g2-ui-grid-view-replace-cell
    2. g2-ui-grid-view-modify-cell

For instance, the procedure below demonstrates how to select cells 0,0 to 3,3 in an existing grid view: 

test( win: item-or-value )
X: Integer;
Y: Integer;
begin
for X = 0 to 3 do
for Y = 0 to 3 do
call g2-ui-grid-view-modify-cell(
the returned-dialog-id of grid-view,
the symbol my-sole-grid-view,
X, Y,
structure( selected: true ),
win
);
end;
end;
end

Cells selected: 

Back to top


 

g2sysprocs.pdf

  1. 5951 KB
  2. View
  3. Download
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments