Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Pass Webgrid dataview to another page
posted

Hi,

 

I have a Ultrawebgrid with LoadOnDemand and Filter row set. I need to be able to pass the FILTERED results from the grid to another page. Is there a way to acces the filtered dataView the Grid is bound to and save it into a session and read it on another page?

 

Thanks,

Jakub

 

Parents
  • 145
    posted

    There is no way to get the filtered data out of the grid in one shot from my understanding. Depending on the size of your grid, you may be able to just build the dataset from the grid after you have filtered it down to what you would like it to look like. If you working with a somewhat small record set then you wouldn't notice much a performance problem. On the other hand, if you are working with large record sets then Im afriad the fastest way to accomplish this would be to write a routine that converted the applied filter conditions the grid uses into useable strings to filter the dataview that is being used by the grid.

    A quick example of the latter suggestion would look like this:

    Protected Sub UltraWebGrid1_RowFilterApplied(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.FilterEventArgs) Handles UltraWebGrid1.RowFilterApplied

    Dim str As String = ""

    Select Case e.ActiveColumnFilter.FilterConditions.Item(0).ComparisonOperator

    Case Infragistics.WebUI.UltraWebGrid.FilterComparisionOperator.Equals

    str = e.ActiveColumnFilter.Column.Key & "=" & e.ActiveColumnFilter.FilterConditions.Item(0).CompareValue

    End Select

    SessionDataView.RowFilter = str

    End Sub

     

    Thats just something I through together so you'll definalty wanna look over it.

Reply Children