Filtering second RepositoryItemLookUpEdit based on value in the first one.


Filtering second RepositoryItemLookUpEdit based on value in the first...
Author
Message
Peter Denton
Peter Denton
StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

We use Strataframe and devexpress, and have had to filter one lookup on another lookup a number of times. What we do is use a bo as the basis for each lookup and have a stored procedure to populate each, then we use the CellValueChanged event to repopulate the lookup appropriately. The following shows a Country/States example in a cardview where a Company is being defined that has both a Delivery and Postal address which could potentially be in different countries, a gridview should be similar.

Private Sub CardView_CellValueChanged(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs) _

Handles CardView1.CellValueChanged

  Select Case e.Column.FieldName

    Case boCMPFieldNames.CMP_CountryForDeliv.ToString

      Me.BoCMP1.FilterChildRecords()

      Me.BoLookupTableStates.RefreshBO("@CNTID", BoCMP1.CMP_CountryForDeliv.ToString)

    Case boCMPFieldNames.CMP_CountryForPost.ToString

      Me.BoCMP1.FilterChildRecords()

      Me.BoLookupTableStates.RefreshBO("@CNTID", BoCMP1.CMP_CountryForPost.ToString)

    Case Else

       ' no action

  End Select

End Sub

It's a while since I looked at this so I'm not entirely sure what the "FilterChildRecords" does in relationship to the Country state relationship.

I hope this helps

Peter

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Thanks for your prompt reply anyway.. I know I can count on you guys when it DOES involve  your product

Thanks for your kind words....we try anyway Smile

StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
No problem Trent... I knew you guys didnt do much with it... I was addressing the masses... ;-)

Thanks for your prompt reply anyway.. I know I can count on you guys when it DOES involve  your product. :-D

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This should have nothing at all to do with SF or a bound BO...this relates to how the grid will behave or react...we don't use DevExpress controls (aside from creating the wrapper), so without going and setting up a sample, I won't be able to give you much direction, sorry Ermm
StarkMike
StarkMike
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have two RepositoryItemLookUpEdits in an XtraGrid... How do I filter the second RepositoryItemLookUpEdit based on the selection I made in the first one?



This is what I found on DevExpress' website but I'm not sure I understand this or that this would be the best way given the fact that i am using StrataFrame and BOs.



http://www.devexpress.com/Support/Center/KB/p/A237.aspx?searchtext=filter+repositoryitemlookupedit&tid=4b2d6f97-c4ae-48fc-87f6-8c5da6541e40&pid=-1



P.S. I know this isnt exactly your product but I thought somebody in here has done this. :-D
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search