Datagrid printing
Guys, i am using the below code to export my output as a word document
Private Sub btnexport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexport.Click
BindGrid()
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=blah.doc")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.No Cache)
Response.ContentType = "application/vnd.word"
Dim stringWrite As New System.IO.StringWriter
Dim htmlwrite As New HtmlTextWriter(stringWrite)
mygrid.RenderControl(htmlwrite)
Response.Write(stringWrite.ToString)
Response.End()
End Sub
export works fine...but when i print the page, i dont get all the columns of the datagrid...i mean datagrid doesnt fit in a page...how and where should i make changes inorder to fit the grid in a page for printing purposes...
thanks in advance...
|