shashasaaim 0 Newbie Poster

I have a datagrid. Right now, the datagrid has an event which is doubleclick on a row.
it doesn't matter at which column i click,it will still be read as a row. this is its code:

<my:DataGrid x:Name="ProjectDG" LoadingRow="ProjectDG_LoadingRow"  IsReadOnly="True" AutoGenerateColumns="False" Cursor="Hand" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" ColumnHeaderHeight="25" HorizontalGridLinesBrush="#FF3B3B3B" VerticalGridLinesBrush="#FF3B3B3B" BorderBrush="{x:Null}" Foreground="Black" Background="Transparent" FontFamily="Century Gothic" FontWeight="Bold" FontStyle="Italic" SelectionMode="Single" ColumnHeaderStyle="{DynamicResource CenterAlignedColumnHeaderStyle}" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" AlternatingRowBackground="{x:Null}" BorderThickness="0" Margin="0,0,0,0">

<my:DataGrid.Columns>
    				
                    <my:DataGridTextColumn x:Name="ProTitle" Binding="{Binding   ProjectTitle}" Header="Project Title" MinWidth="300"/>
                    <my:DataGridTextColumn x:Name="ProOwner" Binding="{Binding ProjectOwner}" Header="PMO" MinWidth="200"/>

                    <my:DataGridTemplateColumn x:Name="StatusIcon" Header="Milestones" Width="Auto" >
                        <my:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                
                                <StackPanel x:Name="PanelStatus" Orientation="Horizontal" HorizontalAlignment="Left"  Loaded="PanelStatus_Loaded" Margin="50,0,30,0"/>
                                    
                            </DataTemplate>
                        </my:DataGridTemplateColumn.CellTemplate>
                        <my:DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <TextBox Text="PlaceHolder"/>
                            </DataTemplate>
                        </my:DataGridTemplateColumn.CellEditingTemplate>
                    </my:DataGridTemplateColumn>
                  
                </my:DataGrid.Columns>
    		</my:DataGrid>

So right now, I want 2 different event based on where is the column i click. I cannot do this right now because it read as a row. Help please.. right now the event is ProjectDG_MouseDoubleClick...ProjectDG is the name of the datagrid..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.