datagrid doubleclick
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: datagrid doubleclick

Threaded View

  1. #1
    Join Date
    Apr 2009
    Posts
    12

    datagrid doubleclick

    I have this grid and on doubleclick I'd like to capture the CorrectionID, values to pass on to a new window. Can anyone guide me>

    Code:
       private void dgCorrectionHistory_MouseDoubleClick(object sender, MouseButtonEventArgs e)  
            {
                MessageBox.Show("You have just selected " + DataGridTextColumn.HeaderStringFormatProperty.ToString() + row);
            }
    Code:
      <dg:DataGrid  Name="dgCorrectionHistory" AutoGenerateColumns="False"                       
                          SelectionMode="Single" GridLinesVisibility="None" HeadersVisibility="Column"
    RowDetailsVisibilityMode="VisibleWhenSelected"  SelectedIndex="0" Grid.IsSharedSizeScope="False" HorizontalAlignment="Stretch"  IsTabStop="True" TabIndex="1"  
    CanUserAddRows="False" CanUserResizeColumns="False" CanUserResizeRows="False" IsTextSearchEnabled="True"
    Loaded="dgCorrectionHistory_Loaded" EnableRowVirtualization="False" Focusable="False" PreviewKeyDown="dgCorrectionHistory_PreviewKeyDown" PreparingCellForEdit="dgCorrectionHistory_PreparingCellForEdit"
    CellEditEnding="dgCorrectionHistory_CellEditEnding" BeginningEdit="dgCorrectionHistory_BeginningEdit" MouseDown="dgCorrectionHistory_MouseDown" LostFocus="dgCorrectionHistory_LostFocus" MouseLeave="dgCorrectionHistory_MouseLeave"
    MouseDoubleClick="dgCorrectionHistory_MouseDoubleClick" PreviewMouseDown="dgCorrectionHistory_PreviewMouseDown">
    
                     
    
                            <dg:DataGrid.Columns >
    
                                <dg:DataGridTextColumn  Header="CorrectionID"  IsReadOnly="True" Binding="{Binding Path=CorrectionID}" Visibility="Visible"    />
                                
                                
                                <dg:DataGridTextColumn  Header="Violation Type" IsReadOnly="True" Binding="{Binding Path=ViolationType}" MaxWidth="175" MinWidth="175" />
                                <dg:DataGridTextColumn  Header="Inspector" IsReadOnly="True" Binding="{Binding Path=IssuedBy}" MaxWidth="100" MinWidth="100" />
    Last edited by gstercken; April 30th, 2009 at 05:08 AM. Reason: Added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center