Subject: Datagrid printing
Posted By: Amorous Post Date: 4/5/2006 10:48:36 AM
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.NoCache)
        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...

Reply By: jbenson001 Reply Date: 4/6/2006 12:25:57 AM
either limit the # of columns or the user can change the page layout to landscape.


Go to topic 42434

Return to index page 322
Return to index page 321
Return to index page 320
Return to index page 319
Return to index page 318
Return to index page 317
Return to index page 316
Return to index page 315
Return to index page 314
Return to index page 313