Hi,
I have a RadWindow which opens up on the click event of a rad button present in each row of a RadGrid.
The RadWindow doesn't open on the single click for the first time (it takes double click for the first time) and opens in single click the next time.
Please see the code below and not sure if I am missing some thing.
Thanks!
ASPX:
<telerik:GridTemplateColumn HeaderText="Order Now" AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10%" ItemStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="gvlnkbtnViewMenu" runat="server" Text="View" CommandName="VIEW" CausesValidation="false" ToolTip="Open PDF" ForeColor="#B72B3C" Font-Bold="false" Font-Underline="true"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
<Windows>
<telerik:RadWindow ID="UserListDialog" runat="server" Modal="true" OnClientShow="setWindowsize" VisibleStatusbar="false" Title="" >
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
function ShowEditForm(id, rowIndex) {
var grid = $find("<%= radGridPrintStatus.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("Viewer.aspx?ID=" + id, "UserListDialog");
return false;
}
ASPX.CS :
protected void radGridPrintStatus_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName.ToUpper().Equals("VIEW"))
{
GridDataItem item = (GridDataItem)e.Item;
string rowId = item["MenuId"].Text;
LinkButton editLink = (LinkButton)item.FindControl("gvlnkbtnViewMenu");
editLink.Attributes["href"] = "javascript:void(0);";
editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", rowId, e.Item.ItemIndex);
}