This is a migrated thread and some comments may be shown as answers.
Open PDF on mouse over of Temple COlumn row
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 23 Apr 2014, 09:40 AM
Please help me how to open PDF file on moust over on Template column

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 24 Apr 2014, 10:00 AM
Hi Rahul,

Please try the following code snippet to open PDF on MouseOver.

ASPX:
<telerik:GridTemplateColumn HeaderText="OpenPDF">
    <ItemTemplate>
        <asp:Button ID="btnOpenWnd" runat="server" Text="Open Window" />
    </ItemTemplate>
</telerik:GridTemplateColumn>
. . .
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
      <telerik:RadWindow ID="RadWindowPDF" runat="server" NavigateUrl="~/Window/RadGridExport.pdf">
      </telerik:RadWindow>
   </Windows>
</telerik:RadWindowManager>

C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
  if (e.Item is GridDataItem)
  {
    GridDataItem dataItem = (GridDataItem)e.Item;
    Button btn = (Button)dataItem.FindControl("btnOpenWnd");
    btn.Attributes.Add("onmouseover", "Open();");
  }
}

JS:
<script type="text/javascript">
    function Open() {
        window.radopen("RadGridExport.pdf", "RadWindowPDF");
    }
  </script>

Thanks,
Shinu
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or