G'dayWe 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 SelectEnd 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