In my double-click function, How to i access my grid (Name="Level2" @ line 17) so that I can set it visibility to visible for the selected row?
If there are any possible way to implement the change of visibility on double-clicking the selected row in WPF is also very welcome...
| <StackPanel Margin="8"> | |
| <ListView Name="listView" ItemsSource="{Binding}" MouseDoubleClick="listView_MouseDoubleClick"> | |
| <ListView.ItemTemplate> | |
| <DataTemplate > | |
| <Grid Name="GridMain" > | |
| <Grid.RowDefinitions> | |
| <RowDefinition>RowDefinition> | |
| <RowDefinition>RowDefinition> | |
| Grid.RowDefinitions> | |
| <Grid Name="Level1" Grid.Row="0" Height="20" > | |
| <TextBlock Text="{Binding col0}" Name="AA" /> | |
| Grid> | |
| <Grid Name="Level2" Grid.Row="1" Visibility ="Collapsed"> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition>ColumnDefinition> | |
| <ColumnDefinition>ColumnDefinition> | |
| Grid.ColumnDefinitions> | |
| <TextBlock Text="{Binding col1}" Grid.Column="0" Name="BB" /> | |
| <TextBlock Text="{Binding col2}" Grid.Column="1" Name="CC"/> | |
| Grid> | |
| Grid> | |
| DataTemplate> | |
| ListView.ItemTemplate> | |
| ListView> | |
| StackPanel> |
Taka ChidodaPosted Feb 19, 2009, 5:59 AM
ListView1.Items[1].Visible =
false;