Hi,
I'm using radgrid with with footer containing a textbox which rows are added dynamically in code behind. My problem is while printing the radgrid some of the contents in the textbox should be printed in second page or following page but its not printing and printing a blank page. Following is the code.
Can somebody please help me.
<telerik:GridTemplateColumn UniqueName="Template1" HeaderText="Description">
<ItemTemplate>
<asp:Label runat="server" ID="lbldesc" Text='<% #Eval("ITEM_DESCRIPTION") %>' />
</ItemTemplate>
<FooterTemplate>
<asp:TextBox runat="server" ID="txt" TextMode="MultiLine" Width="95%" style="overflow:hidden" ReadOnly="true" AutoPostBack="false" ></asp:TextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>
function OnClientClicked(button, args) {
debugger
var previewWnd = window.open('about:blank', '', '', false);
var sh = '<%= ClientScript.GetWebResourceUrl(rdgrdResults.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",rdgrdResults.Skin)) %>';
var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
var htmlcontent = styleStr + "<body>" + $find('<%= rdgrdResults.ClientID %>').get_element().outerHTML + "</body></html>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
}
I'm using radgrid with with footer containing a textbox which rows are added dynamically in code behind. My problem is while printing the radgrid some of the contents in the textbox should be printed in second page or following page but its not printing and printing a blank page. Following is the code.
Can somebody please help me.
<telerik:GridTemplateColumn UniqueName="Template1" HeaderText="Description">
<ItemTemplate>
<asp:Label runat="server" ID="lbldesc" Text='<% #Eval("ITEM_DESCRIPTION") %>' />
</ItemTemplate>
<FooterTemplate>
<asp:TextBox runat="server" ID="txt" TextMode="MultiLine" Width="95%" style="overflow:hidden" ReadOnly="true" AutoPostBack="false" ></asp:TextBox>
</FooterTemplate>
</telerik:GridTemplateColumn>
function OnClientClicked(button, args) {
debugger
var previewWnd = window.open('about:blank', '', '', false);
var sh = '<%= ClientScript.GetWebResourceUrl(rdgrdResults.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",rdgrdResults.Skin)) %>';
var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
var htmlcontent = styleStr + "<body>" + $find('<%= rdgrdResults.ClientID %>').get_element().outerHTML + "</body></html>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
}