Please add this code on click event :
private void dataGrid1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Popup p;
// Create a popup.
p = new Popup();
// Set the Child property of Popup to an instance of MyControl.
p.Child = new Views.SilverlightControl1();
// Set where the popup will show up on the screen.
p.VerticalOffset = 600;
p.HorizontalOffset = 600;
// Open the popup.
p.IsOpen = true;
//MessageBox.Show(dataGrid1.CurrentColumn.Header.ToString() + ": " +
// ((TextBlock)dataGrid1.CurrentColumn.GetCellContent(dataGrid1.SelectedItem)).Text);
}
//------------------------------
private void CloseBtn_Click(object sender, RoutedEventArgs e)
{
this.Visibility = Visibility.Collapsed;
}
private void dataGrid1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Popup p;
// Create a popup.
p = new Popup();
// Set the Child property of Popup to an instance of MyControl.
p.Child = new Views.SilverlightControl1();
// Set where the popup will show up on the screen.
p.VerticalOffset = 600;
p.HorizontalOffset = 600;
// Open the popup.
p.IsOpen = true;
//MessageBox.Show(dataGrid1.CurrentColumn.Header.ToString() + ": " +
// ((TextBlock)dataGrid1.CurrentColumn.GetCellContent(dataGrid1.SelectedItem)).Text);
}
//------------------------------
private void CloseBtn_Click(object sender, RoutedEventArgs e)
{
this.Visibility = Visibility.Collapsed;
}
No comments:
Post a Comment