thz man!the coding works for me.. but there is another problem, my datagrid has been loaded with a datatable contains 31 records, under screen resolution of 1024*768, the screen is able to show and print out all the records, but if user change screen resolution to 800*600, the records that can show in one screen is only 21 records, the rest of the records needed to be scroll down to view, then the datagrid printed out only contains 21 records that can be shown on the screen... wat should i do??:doh: