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
595
Action when clicking on record selector arrow
posted

Hi!

I have implemented the solution described here: http://community.infragistics.com/forums/p/43348/238054.aspx#238054, adding "row details" when the user clicks on the record selector arrow. I need to know which event is getting fired, however, when the row details are expanded? I want to calculate some results to display, but I don't want this to happen if the user clicks anywhere else on the record (without expanding it). So far I've tried Grid_RecordActivated, Grid_RecordActivatedDirect, and Grid_SelectedItemsChanged, but they all fire regardless of where on the row the user clicks. 

I know that the cellvaluepresenter is set to visible when the following event is triggered, but I do not know how to set this in the XAML on the grid.

 

<DataTrigger Binding="{Binding IsSelected}" Value="True">

               <Setter Property="Visibility" Value="Visible" />

 </DataTrigger>

 

Thanks,

Martin

Parents
No Data
Reply
  • 595
    posted

    I was able to solve it using this code: 

        Private Sub Grid_SelectedItemsChanged(sender As System.Object, e As Infragistics.Windows.DataPresenter.Events.SelectedItemsChangedEventArgs)

            Dim temp As DataRecord = CType(sender, XamDataGrid).ActiveRecord

            If temp.Cells("Details").Record.IsSelected = True Then

               'execute code here

            End If

        End Sub

    However, how do I remove the extra spacing that's added between each row (where the row details field is - I get that this is not an actual line spacing since my code is triggered when I click "between" the rows)?

Children