This is a migrated thread and some comments may be shown as answers.

Rad Grid Footer with Texbox having 100 rows

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
srivalli kothapalli
Top achievements
Rank 1
srivalli kothapalli asked on 18 Feb 2014, 05:19 PM
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();
            }

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 21 Feb 2014, 08:57 AM
Hello Srivalli,

Since the printing option is not officially supported, I would recommend you to use the built-in Export to Pdf functionality.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
srivalli kothapalli
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or