Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
lssql = "SELECT * from Orders"
If dbConn.State = ConnectionState.Closed Then dbConn.Open()
cmdCStr = New SqlCommand(lssql, dbConn)
adapter.SelectCommand = cmdCStr
adapter.Fill(ds)
Grid1.DataSource = ds
Grid1.DataBind()
Response.Buffer = True
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1.0)
Response.Expires = -1500
Response.CacheControl = "no-cache"
End If
End Sub
Protected Sub FlatGrid_ServerExcelExporting(sender As Object, e As Syncfusion.JavaScript.Web.GridEventArgs)
Dim exp As New ExcelExport()
exp.Export(Grid1.Model, DirectCast(Grid1.DataSource, DataTable), "Export.xlsx", ExcelVersion.Excel2010, True, True, "flat-lime")
End Sub
Protected Sub FlatGrid_ServerWordExporting(sender As Object, e As Syncfusion.JavaScript.Web.GridEventArgs)
Dim exp As New WordExport()
exp.Export(Grid1.Model, DirectCast(Grid1.DataSource, DataTable), "Export.docx", True, True, "flat-lime")
End Sub
Protected Sub FlatGrid_ServerPdfExporting(sender As Object, e As Syncfusion.JavaScript.Web.GridEventArgs)
Dim exp As New PdfExport()
exp.Export(Grid1.Model, DirectCast(Grid1.DataSource, DataTable), "Export.pdf", True, True, "flat-lime")
End Sub
Thanks & Regards
Satheyaraaj PT