on your code
I got Error because no attribute onmousedown.
I try onClick Event and call Gridweb1.LoadPostData() but Excel data not update. let see my code below
Private Sub ButtonExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonExport.Click
Gridweb1.LoadPostData()
Gridweb1.WebWorksheets.SaveDataToExcelFile(TempFilePath, originalFilePath)
' Sents the file to browser.
Response.ContentType = "application/vnd.ms-excel"
'Adds header.
Response.AddHeader("content-disposition", "attachment; filename=" & TempFileName)
' Writes file content to the response stream.
Response.WriteFile(TempFilePath)
' OK.
Response.End()
End Sub