This question is locked. New answers and comments are not allowed.
| public class MyGridViewDataColumn : GridViewDataColumn |
| { |
| public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem) |
| { |
| Button btn = new Button(); |
| btn.Width = 30; |
| btn.Content = "Click"; |
| btn.Click += new RoutedEventHandler(btn_Click); |
| return btn; |
| } |
| void btn_Click(object sender, RoutedEventArgs e) |
| { |
| Control ctrl = sender as Control; |
| if (ctrl != null) |
| { |
| ctrl.Focus(); |
| } |
| MessageBox.Show( ???? <- i wanna get a value of this row's another cell ); |
| //throw new NotImplementedException(); |
| } |
| } |
Hi.
Sorry for taking your time. but i can't search a solution of my problem.
I saw some code for making a dynimic button in gridview.
but i cant get a value of another cell in the button's row Or rowindex of the clicked button.
how to get the infomation?
thank you advance.
