Just before the grid shows, I would like to check, if the grid returns too many rows, and if so, to stop
it from showing.
On which event, and how can I do it.
Also how do I know how many rows does the grid contain. if it by the property Rows, or should I check also in the bands?
I don't understand your question. You control when the grid or the form it is on is shown.
You could check grid.Rows.Count to determine if the grid has 0 rows.
I will explain again.
If the user will get many rows on the grid, it might be too heavy for their computer, and the computer might get stuck.
So I want the grid not to show, if it is going to show too many rows.
I dont know beforehand the datasource, so it is better to use grid.Rows.Count, as you mention.
On which event should I stop the grid from showing?
Um... I'm really not sure how to answer your question. When you show the grid has nothing to do with the grid itself, it's determined by your application.
If the grid is "too heavy", then my guess is that it's the data source that has too many rows and simply not displaying the grid won't help much. It sounds to me like you need to check the number of rows in the data source before binding it to the grid.