<ListView Name="listUsers"
SelectionMode="Single" Height="200"
SelectionChanged="listUsers_SelectionChanged">
<ListView.View>
<GridView AllowsColumnReorder="true"
x:Name="grdCustomer">
<GridViewColumn Header="User Id"
>
<GridViewColumn.CellTemplate>
<DataTemplate>
<Button Name="btnUserId"
Cursor="Hand" Tag="{Binding Path=UserId }" Click="btnUserId_Click"
Content="{Binding Path=UserId }" Style="{StaticResource LinkButton}">Button>
DataTemplate>
GridViewColumn.CellTemplate>
GridViewColumn>
<GridViewColumn Header="Mobile" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<Label Foreground="DarkBlue"
Name="lblMobile" HorizontalAlignment="Center">
<Label.Content>
<Binding Path="Mobile"/>
Label.Content>
Label>
DataTemplate>
GridViewColumn.CellTemplate>
GridViewColumn>
GridView>
ListView.View>
ListView>

Mahesh AllePosted Feb 6, 2013, 1:17 AM
With you answer, I am finding the required value. But how to find the "lblMobile" control from my code behind like findcontrol in asp.net.
Please help me.
Thank you for you answer.
Santhosh Kumar JayaramanPosted Feb 5, 2013, 8:17 AM
Your button will look like
<Button Name="btnUserId" Cursor="Hand" Tag="{Binding Path=UserId }" Click="btnUserId_Click" Content="{Binding Path=UserId }" Style="{StaticResource LinkButton}" CommandParameter="{Binding Path=Mobile} >Button>
and in the button click event
private void Button_Click(object sender, RoutedEventArgs e)
{
object Mobile = ((Button)sender).CommandParameter;
}