I've programatically created a column with a button in my RadGridView and have created an event handler for the button click:
public class GridViewImageButtonColumn : GridViewHyperlinkColumn
{
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
{
Button btn = new Button();
btn.Click +=
new RoutedEventHandler(btn_Click);
return btn;
}
I even found out how to call the pages javascript by using this code in my click event handler:
void btn_Click(object sender, RoutedEventArgs e)
{
HtmlPage.Window.Invoke("jsfunction", new string[] { rowData });
}
}
However, I'm not sure how can I get the the RadGridView row data from the row that the button was clicked in.
Questions:
1) how do I find out which row number that I clicked on?
2) how do I access each cell's data from each column in the row that I clicked?