object.EmptyRows [=value]
Specifies the number of empty rows displayed at the bottom of the editable grid. Each empty row allows the user to insert a new record into the database. The more empty rows, the more records can be inserted at once.
Users may modify this property to change the number of empty rows according to their preferences, or to display a constant number of rows (editable and empty ones) on the form.
The following code sets the number of empty rows according to session variable that stores the preferred number of insertable rows. This code should be placed in editable grid's Before Show event.
Dim RowsNum RowsNum = Session("NoRowsToInsert") If IsNumeric(RowsNum) AND NOT IsEmpty(RowsNum) Then InvoiceRowsGrid.EmptyRows = RowsNum Else InvoiceRowsGrid.EmptyRows = 1 End If
On-line, printable versions and updates