0

So, I have a master grid and a detail grid within that master grid.

I am grabbing the masterkey from my parent grid via the BeforePerformDataSelect and placing this value into a session variable. At that point I also need to grab a value from the specific row that I am on. Lets call that variable SENT_DATE.

Here is some sample code.

Protected Sub gvDetails_BeforePerformDataSelect(ByVal sender As Object, ByVal e As EventArgs)
        Dim gvDetails As ASPxGridView = (TryCast(sender, ASPxGridView))
        Session("ID_NUMBER") = gvDetails.GetMasterRowKeyValue
        Session("SENT_DATE") = gvDetails.GetRowValues("SENT_DATE")
End Sub

I have worked with DevExpress products a lot before but it has been quite some time. If I remember correctly, normally I just grab the e.VisibleIndex and I am able to go from there but in this specific event I am unable to grab this. I know the above code is incorrect for grabbing the variable SENT_DATE, but I am not sure what to do here.

Any ideas, advice would be greatly appreciated. Thanks. I have searched the DevExpress forums deeply.

Filip
  • 3,257
  • 2
  • 22
  • 38
Bill Blankenship
  • 3,316
  • 6
  • 43
  • 73

1 Answers1

0

You can use FocusedRowIndex property.

Session("SENT_DATE") = gvDetails.GetRowValues(gvDetails.FocusedRowIndex, "SENT_DATE")
Filip
  • 3,257
  • 2
  • 22
  • 38
  • Gosh, great way of doing this, wish I would have had this earlier. I already went a different route with this, but thank your very much for this solution I am sure I will use this in the future. – Bill Blankenship Aug 20 '12 at 15:21