This is a migrated thread and some comments may be shown as answers.

[Solved] Rows missing in grid

0 Answers 131 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Davis
Top achievements
Rank 2
John Davis asked on 18 Dec 2009, 01:17 PM

 

Originally I posted this question:
How can I debug to find out why rows are missing from the grid?
In debug mode I can examine  RadGrid1.DataSource (it is a DataTable).  The rows property shows count=68.  However only 4 rows display in the grid.

I discovered the problem.  This web page automatically applies a filter that reduces the number of rows displayed.  Apparently this filter applies AFTER the data from datasource is fed to the grid.  Below is the code that applies the filter, in case it could help someone.

 

 

Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender

 

 

If (Not Page.IsPostBack) Then

 

 

 

 

RadGrid1.MasterTableView.FilterExpression =

"([QtyShort] > '0') "

 

 

 

 

 

Dim column As GridColumn = RadGrid1.MasterTableView.GetColumnSafe("QtyShort")

 

column.CurrentFilterFunction = GridKnownFunction.GreaterThan

column.CurrentFilterValue =

"0"

 

 

 

 

RadGrid1.MasterTableView.Rebind()

 

End If

 

 

 

 

 

End Sub

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
John Davis
Top achievements
Rank 2
Share this question
or