Filter an EpiGrid (SOLVED)

Thanks Mr. Koch! Your input got me closer to the solution.

If anyone else runs into this challenge the solution is below. I placed this piece of code in an EpiViewnotification. After the user saves, the grid is regenerated with the filter applied.

Public Class Script

Private WithEvents DataSharingGrid As EpiUltraGrid

Public Sub InitializeCustomCode()

DataSharingGrid = CType(csm.GetNAtiveControlReference("5c9e9edc-61a0-4085-8701-839ad7248e57"), EpiUltraGrid)

End Sub

Public Sub DestroyCustomCode()
End Sub

Private Sub edvCustomer_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)

Me.DataSharingGrid.Rows.ColumnFilters("Key3").FilterConditions.Add(Infragistics.Win.UltraWinGrid.FilterComparisionOperator.Equals, "DataSharing")

End Sub

End Class

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> Hi,
>
> You could try using the AfterRowInsert event.
>
>
>
>
> ________________________________
> From: chan213419 <chan213419@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, June 6, 2013 8:46 AM
> Subject: [Vantage] Filter an EpiGrid
>
>
> Good morning!!!
>
> I am trying to figure out how to filter an EpiGrid, and it appears that I am only half way there. The code below filters the grid just fine, but only when the grid is first initialized. I would like it to be filtered "live" so to speak (so when I add a new row it immediately pops up in the grid). Any suggestions or help would be greatly appreciated.
>
> Public Class Script
>
> Private WithEvents DataSharingGrid As EpiUltraGrid
>
>
> Public Sub InitializeCustomCode()
>
> DataSharingGrid = CType(csm.GetNAtiveControlReference("5c9e9edc-61a0-4085-8701-839ad7248e57"), EpiUltraGrid)
>
> End Sub
>
> Public Sub DestroyCustomCode()
>
> End Sub
>
> Private Sub DataSharingGrid_InitializeRow(ByVal Sender As Object, ByVal Args As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles DataSharingGrid.InitializeRow
>
> If Args.Row.Band.Index = 0 Then
> Â Â Â Â Â Â If Args.Row.Cells("Key3").Value <> "DataSharing" Then
> Â Â Â Â Â Â Â Â Â Args.Row.Hidden = True
> Â Â Â Â Â Â End If
> End If
>
> End Sub
>
> End Class
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
> [Non-text portions of this message have been removed]
>
Good morning!!!

I am trying to figure out how to filter an EpiGrid, and it appears that I am only half way there. The code below filters the grid just fine, but only when the grid is first initialized. I would like it to be filtered "live" so to speak (so when I add a new row it immediately pops up in the grid). Any suggestions or help would be greatly appreciated.

Public Class Script

Private WithEvents DataSharingGrid As EpiUltraGrid


Public Sub InitializeCustomCode()

DataSharingGrid = CType(csm.GetNAtiveControlReference("5c9e9edc-61a0-4085-8701-839ad7248e57"), EpiUltraGrid)

End Sub

Public Sub DestroyCustomCode()

End Sub

Private Sub DataSharingGrid_InitializeRow(ByVal Sender As Object, ByVal Args As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles DataSharingGrid.InitializeRow

If Args.Row.Band.Index = 0 Then
If Args.Row.Cells("Key3").Value <> "DataSharing" Then
Args.Row.Hidden = True
End If
End If

End Sub

End Class
Hi,

You could try using the AfterRowInsert event.




________________________________
From: chan213419 <chan213419@...>
To: vantage@yahoogroups.com
Sent: Thursday, June 6, 2013 8:46 AM
Subject: [Vantage] Filter an EpiGrid


Good morning!!!

I am trying to figure out how to filter an EpiGrid, and it appears that I am only half way there. The code below filters the grid just fine, but only when the grid is first initialized. I would like it to be filtered "live" so to speak (so when I add a new row it immediately pops up in the grid). Any suggestions or help would be greatly appreciated.

Public Class Script

Private WithEvents DataSharingGrid As EpiUltraGrid


Public Sub InitializeCustomCode()

DataSharingGrid = CType(csm.GetNAtiveControlReference("5c9e9edc-61a0-4085-8701-839ad7248e57"), EpiUltraGrid)

End Sub

Public Sub DestroyCustomCode()

End Sub

Private Sub DataSharingGrid_InitializeRow(ByVal Sender As Object, ByVal Args As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles DataSharingGrid.InitializeRow

If Args.Row.Band.Index = 0 Then
      If Args.Row.Cells("Key3").Value <> "DataSharing" Then
         Args.Row.Hidden = True
      End If
End If

End Sub

End Class











------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]