I am currently using a dataview derived from a datatable to fill a datagrid. I am using a dataview rowfilter to only show certain records at a certain time. The issue I am having is that I would like to always show 20 rows in the grid, whether or not they are all filled with data. I am able to do it should I use the datatable in the if statement, but not with the dataview in the else statement. <BR><BR>Can anyone make any suggestions? <BR>The current code below adds one row to the dataview row count, but then seems to get stuck. It does not add anymore additional rows after that one, though it does keep looping thru the while statement. <BR><BR><BR> Private Sub DisplayResults()<BR> Dim con As SqlConnection<BR> Dim cmd As SqlCommand<BR> Dim dad As SqlDataAdapter<BR> Dim dtbl As DataTable<BR> Dim dtvAlpha As DataView<BR><BR> Try<BR> con = New SqlConnection(ConfigurationSettings.AppSettings("e RA_CONN_STRING"))<BR> cmd = New SqlCommand("sp_GetReportRegisteredProviders", con)<BR><BR> With cmd<BR> .Parameters.Add("@SortColumn", Me.ViewState("SortColumn"))<BR> .Parameters.Add("@SortOrder", Me.ViewState("SortOrder"))<BR> .CommandType = CommandType.StoredProcedure<BR> .Connection.Open()<BR> End With<BR><BR> dad = New SqlDataAdapter(cmd)<BR> dtbl = New DataTable()<BR> dad.Fill(dtbl)<BR><BR> dtvAlpha = New DataView(dtbl)<BR> If strAlpha = "All" Then<BR><BR> &#039;Pad empty rows to maintain grid size<BR> Me.PadEmptyRows(dgrdRegisteredProviders, dtbl)<BR><BR> &#039;Bind to DataGrid<BR> dgrdRegisteredProviders.DataSource = dtbl<BR> dgrdRegisteredProviders.DataBind()<BR><BR> Else<BR><BR> dtvAlpha.RowFilter = "Prov_Name LIKE &#039;" & strAlpha & "%&#039; Or Prov_Name LIKE &#039;" & strAlpha1 & "%&#039;"<BR><BR> Do While dtvAlpha.count Mod dgrdRegisteredProviders.PageSize &#062; 0 Or dtvAlpha.count = 0<BR> dtvAlpha.AddNew()<BR> Loop<BR><BR> &#039;Bind to DataGrid<BR> dgrdRegisteredProviders.DataSource = dtvAlpha<BR> dgrdRegisteredProviders.DataBind()<BR><BR> End If<BR><BR> Catch exc As SqlException<BR> Dim err As New UnisysComponents.ErrorHandler()<BR> err.ThrowError(exc)<BR> Catch exc As Exception<BR> Dim err As New UnisysComponents.ErrorHandler()<BR> err.ThrowError(exc)<BR> Finally<BR> con = Nothing<BR> cmd = Nothing<BR> dtbl = Nothing<BR> dad = Nothing<BR> dtvAlpha = Nothing<BR> End Try<BR> End Sub<BR><BR><BR> Private Sub PadEmptyRows(ByVal dgrd As DataGrid, ByVal dtbl As DataTable)<BR> &#039;Pad empty rows to maintain grid size<BR> Do While dtbl.Rows.Count Mod dgrd.PageSize &#062; 0 Or dtbl.Rows.Count = 0<BR> dtbl.Rows.Add(dtbl.NewRow)<BR> Loop<BR> End Sub<BR><BR>