How to update displayed Columns and Rows

Hi,

 
How do i update the number of visible columns and rows in a FlexCelGrid ?
 
I need it to be done on two occasions :
 
1. When creating a new file :


  FlexCelImport.Newfile(1);

  For x:=1 to 10 do

    FlexCelImport.CellValue[1,x]:=x;


 
2. When pasting contents into the grid.
 
On both occations i can see that the FlexcelImport does remember the values, but i need the Grid to reflect the changes.
 
How do i do that ?
 
Thanks
Jan
 
 

Never mind.

 
I forgot all about the FlexcelGrid.LoadSheet - and it works like a charm :o)
 
Best regards
Jan

Hi,

There are 2 methods you need to use to sync FlexCelGrid and FlexCelImport.

1) When you change things in FlexCelImport and you want them applied to FlexCelGrid, you need to call:
FlexCelGrid.LoadSheet;

2)When the user changes things in FlexCelGrid and you want them changed in the FlexCelImport, you need to call:
FlexCelGrid.ApplySheet;

While most things are synchronized automatically, it is a good idea to always call those methods whenever you change somehting in the grid/FlexCelImport so it is reflected in the other.
 You can look at the XlsViewer demo and search for "LoadSheet" and "ApplySheet" to have an example of how they are used.

Regards,
   Adrian.

Oops... you were faster than me answering... I need to practice more :)