Hi all,
is there any response to my question ?
Thanks.
ML
>Hi,
Thanks for the reply.
I'm using the PaintElement method to repaint some cells and I see that even if the grid is completly covered by another window it seems that the cells are painted ( I can see this by the CPU usage ), but if instead I use the InvalidateRange method to invalidate the cells, if the grid is covered by another window the cells are not repainted (the CPU usage is 0). What is the difference between the two ? Why with the invalidateRange method the grid doesn't repaint the hidden cell ?
>Hi ML,
Thanks for the interest in Syncfusion Grid.
It is not possible to find out the visible cell(covered by another window). But you can calculate the number of visible rows and column in a Grid. Please refer the following code snippet for more detail.
//To Calculate the number of visible rows in a Grid.
int visibleRows = this.gridControl1.ViewLayout.LastVisibleRow - this.gridControl1.TopRowIndex;
//To Calculate the number of visible columns in a Grid.
int visibleCols = this.gridControl1.ViewLayout.LastVisibleCol - this.gridControl1.LeftColIndex;
//To set the TopRowIndex for changing the Row view of the Grid.
this.gridControl1.TopRowIndex = RowIndex - visibleRows/2;
//To set the LeftColIndex for changing the Column view of the Grid.
this.gridControl1.LeftColIndex = ColIndex - visibleCols/2;
Please refer the sample in the below link that illustrates the above.
http://websamples.syncfusion.com/samples/Grid.Windows/I73724/main.htmPlease let me know if you have any questions.
Regards,
Asem.