Hey All,
So i have a Radgrid with a radgridcolumnbutton;
<telerik:GridButtonColumn ButtonType="ImageButton"
FilterControlAltText="Filter PDFExport column" HeaderText="PDF"
ImageUrl="Icons\PDF_Export.png" CommandName="generateSamplePDF_click" UniqueName="generateSamplePDF_click" >
</telerik:GridButtonColumn>
What need this button to do is to execute the the below which creates a pdf report
Protected Sub generateSamplePDF_click(ByVal sender As Object, ByVal e As ...............................)
Dim strPath As String = ""
Dim sampleID As String = ""
Dim filename As String = ""
sampleID = *****whatever text is in column 2 of the row where the button whas selected****
' this is what is used before sampleID = grdTests.Rows(e.CommandArgument).Cells(0).Text
Dim path As String = Server.MapPath("LimsPDF") & "\" & Session("loggedCompanyID") & "\"".pdf"
strPath = Server.MapPath("~/PDF/pdf_sample_" & sampleID & ".pdf")
filename = "pdf_sample_" & sampleID & ".pdf"
Report_Result_UtilityClass.generateSamplePDF(strPath, sampleID)
Response.ContentType = "application/pdf"
Response.AddHeader("Content-Disposition", "attachment;filename=" & filename)
Me.EnableViewState = False
Response.WriteFile(strPath)
Response.Flush()
Response.Close()
End Sub
any help would be very much appreciated