|
-
Jul 5th, 2007, 09:56 AM
#1
Thread Starter
Hyperactive Member
Javascript+GridView+asp.net
Hi all
I want to know How can we define no of rows in a window.
but this script writes all rows of that gridView.
So How can we control no of rows so we can print as many no of record as we want. Is there any other function Please let me know.
Your help is highly appreciated, Thanks
<script language="javascript" type="text/javascript">
function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var strOldOne=prtContent.innerHTML;
var WinPrint = Window.open('','','letf=100,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable =1');
WinPrint.document.write(prtContent.outerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
Using .NET 3.5 (VS 2008) And XP SP2

-
Jul 5th, 2007, 10:48 AM
#2
Re: Javascript+GridView+asp.net
You'll have to do some estimation. Get your page to display a long, long datagrid and figure out how many rows you do want displayed. Then, next time, just have your dataset contain x rows, bind the grid to that dataset.
-
Jul 6th, 2007, 01:52 AM
#3
Thread Starter
Hyperactive Member
Re: Javascript+GridView+asp.net
Thanks Mendhak.
Dataset contain x rows, bind the grid to that dataset
It will be dependant on GridView's Data.
Can I not handle this in javascript. Means GridView contains 500 Records but I want to print only 50 to 100 using JAVASCRIPT..
Means JAVASCRIPT has nothing to do with GridView. Javascript will take data from GridView and will print how many rows we want to print.
Thanks, Bye
Using .NET 3.5 (VS 2008) And XP SP2

-
Jul 9th, 2007, 09:34 AM
#4
Re: Javascript+GridView+asp.net
You can't. You have to serve this up as part of your HTML and you could potentially 'block' off the rows after #500 using CSS by placing it in another div.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|