is there any way we can disable on mouse over event on certain columns of an data grid

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2010-05-21T01:38:53Z Indexed on 2010/05/21 1:40 UTC
Read the original article Hit count: 287

Filed under:

hi,

here wat i am trying to do is that on mouse over of first column i need to hit mouse MouseEnter event and show the pop up which i have kept there

rest all other column i dnt need to to show the pop up so i am having this fuction there MouseLeave="Row_MouseLeave"

<sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" Grid.Row="1"   IsReadOnly="True"  Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged"  SelectionMode="Extended"   RowDetailsVisibilityMode="VisibleWhenSelected" MouseEnter="dgCounty_MouseEnter" MouseLeave="dgCounty_MouseLeave" SelectionChanged="dgCounty_SelectionChanged" LoadingRow="dgCounty_LoadingRow1" UnloadingRow="dgCounty_UnloadingRow">
            <sdk:DataGrid.Columns>
                <sdk:DataGridTemplateColumn>
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="myButton" Width="24" Height="24" Click="Details_Click">
                                <Image  x:Name="img" Source="Images/detail.JPG" Stretch="None"/>
                            </Button>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="ID">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding EmployeeID}"  />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="Name">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding EmployeeFName}"  MouseLeave="Row_MouseLeave"  />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="MailID">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding EmployeeMailID}"  MouseLeave="Row_MouseLeave"  />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
            </sdk:DataGrid.Columns>
 </sdk:DataGrid> 
 in code  behind
 void Row_MouseLeave(object sender, MouseEventArgs e)
        {

                Show.Visibility = Visibility.Collapsed;
                PoPGrid.Visibility = Visibility.Collapsed;

        } 
void Row_MouseEnter(object sender, MouseEventArgs e)
        {  

} 

the pop up her is like the ajax modal pop up wat we do in asp.net i am able to show data in pop up now the main issue is i need to show pop up only on the 2 column. rest all other column i need to hide the pop up when i move mouse over on that column.

i am trying this concept it is not working is there any way i can achive it as i said only need to show pop up on mouse over of the 2 column

thanks in advance prince

© Stack Overflow or respective owner

Related posts about silverlight-4.0