Community discussion forum

how to print datagrid

  • 9 months ago
    how to print datagrid values in asp.net usingvb
    Post was edited on 23/02/2009 08:00:23 Report abuse
  • 9 months ago
    Hi, are the values displayed on screen? Do you want to just click a button and then have them print? Si
  • 9 months ago
    hi friend yes if i just click a button and then have them print
  • 9 months ago
    Hi, if you add a button with a clientclick function of "window.print(); return false;" that should sort it. Si
  • 9 months ago
    It would be better if you create a new window with only the grid content in case you have more than one page in your grid and then do print the new window using javascript function window.print()
  • 8 months ago
    hi friend thanks for ur reply actually i want to print datagrid values only if use window.print it prints the whole page
  • 8 months ago
    hi friend thanks for ur reply actually i want to print datagrid values only if use window.print it prints the whole page
  • 8 months ago
    hi friend thanks for ur reply actually i want to print datagrid values only if use window.print it prints the whole page
  • 8 months ago
    Hi, in that case you have two options really: 1. redirect them to a new page with just the data on 2. use the @media print stylesheet construct to hide elements that shouldn't be visible in printing Regards Simon C
  • 8 months ago
    ''aspx page
    ''Code behind Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Me.btnPrint.Attributes.Add("OnClick", "CallPrint('divPrint');") End If End Sub
  • 8 months ago
    Sorry missed some part of the code...
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Me.btnPrint.Attributes.Add("OnClick", "CallPrint('divPrint');") End If End Sub
  • 8 months ago
    Add your control within a DIV tag...
  • 8 months ago
    thank u very much it really helpful for me .once again thanks to all
  • 8 months ago
    hi i also want to know about in windows application ie. how to print datagrid values using vb.et
  • 8 months ago
    please help me its urgent

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!