Printing A DataGrid Contents..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Smish
    New Member
    • Jan 2007
    • 51

    Printing A DataGrid Contents..

    hey,

    Could anyone guide me as to how to go about printing a Datagrid contents..

    I have a print button on a web page.
    On the click of this button "ONLY " the contents of the datagrid from the WebPage must b printed.

    Waiting for the reply...
    Thanx a lot.
  • vidhyapriya
    New Member
    • Mar 2007
    • 64

    #2
    Code:
    for i=0 to datagridview.rows.count-1
    if datagrindview.rows.count>0 then
    p(10)=new point(10,250)
    e.graphics.drawstring(datagridview(columnindex,i),font,drawbrush,p(10))
    end if
    next

    Comment

    • aspamit
      New Member
      • Jan 2007
      • 38

      #3
      Originally posted by vidhyapriya
      Code:
      for i=0 to datagridview.rows.count-1
      if datagrindview.rows.count>0 then
      p(10)=new point(10,250)
      e.graphics.drawstring(datagridview(columnindex,i),font,drawbrush,p(10))
      end if
      next

      What is 'p' in the code?
      I am using c#
      I have declared p as a point.
      Help me.
      Thnks.

      Comment

      • Smish
        New Member
        • Jan 2007
        • 51

        #4
        Originally posted by aspamit
        What is 'p' in the code?
        I am using c#
        I have declared p as a point.
        Help me.
        Thnks.

        Am really sorry to ask this question but cant help it....
        How hard i tried nt able to get graphics class..
        so please could u elaborate it ..
        thanx a lot

        Comment

        Working...