I have a grid with image button column. On Client click I want to open window with some data from another class. The following code does that but need to click button twice. I just can not fugure out wants wrong. Please help.
.cs
.aspx
When I click for the first time, it goes to "<%= RadAjaxManager.ClientID %> and does nothing. And second click the window pops up with correct data.
.cs
if (e.CommandName == "viewQuals")
{
GridDataItem dataItem = (GridDataItem)e.Item;
int id = int.Parse(dataItem["EIDColumn"].Text);
ImageButton updateButton = dataItem["viewQualsColumn"].Controls[0] as ImageButton;
updateButton.OnClientClick = "return viewQualsClick(" + id + ")";
}
function viewQualsClick(id) {
window.open("RES_MQ_new.aspx?empid=" + id, "", "width=550,height=700,resizable=yes,scrollbars=yes");
}
function ajaxRefresh() {
var ram = $find("<%= RadAjaxManager.ClientID %>");
ram.ajaxRequest("foo");
}