Greetings,
I have a RadGrid that fits in a space larger than the height of the rendered grid itself and add empty rows to it to fill in the background area to make it visually look more appealing (like a spreadsheet).
I use the following bit of code to add the empty rows to the end of the data table that I use as a source of data.
The GridPageSize can vary, but for this example, let's say that it is set to 30 and that I only retrieve 4 records from the database.
This serves the purpose of rendering the Grid in the following way:
Column Headers
Filter Row
4 Rows with Data
26 Empty Rows
CommandItems
Pager
When I apply a filter on the table, my empty rows are hidden.
When I sort the table by a column, my empty rows are included in the sort.
For the Filter, which functions and/or events do I have to work with to show my empty rows after the filter is applied?
For a Sort, which functions and/or events do I have to work with to temporarily remove my empty rows and add back after the sort is complete?
Thanks in advance,
Matt
I have a RadGrid that fits in a space larger than the height of the rendered grid itself and add empty rows to it to fill in the background area to make it visually look more appealing (like a spreadsheet).
I use the following bit of code to add the empty rows to the end of the data table that I use as a source of data.
Dim remainder As Integer | |
Math.DivRem(dt.Rows.Count, GridPageSize, remainder) | |
If remainder <> 0 Then | |
For i As Integer = 1 To GridPageSize - remainder | |
dt.Rows.Add(dt.NewRow()) | |
Next | |
End If |
The GridPageSize can vary, but for this example, let's say that it is set to 30 and that I only retrieve 4 records from the database.
This serves the purpose of rendering the Grid in the following way:
Column Headers
Filter Row
4 Rows with Data
26 Empty Rows
CommandItems
Pager
When I apply a filter on the table, my empty rows are hidden.
When I sort the table by a column, my empty rows are included in the sort.
For the Filter, which functions and/or events do I have to work with to show my empty rows after the filter is applied?
For a Sort, which functions and/or events do I have to work with to temporarily remove my empty rows and add back after the sort is complete?
Thanks in advance,
Matt