HI
I'm new to the ASP.NET Web RadControls. I am taking over a project that uses them and trying to address some bug issues. What I am seeing are pages that behave differently.
In one case, what I'm seeing is a page where the grid extends past the bottom of the page and a vertical scroll bar on the right side. If I scroll the vertical scroll bar to the bottom, I still cannot see the bottom of the grid unless I enlarge the Browser frame past the height of the grid. The RadGrid appears to snap to the status bar of the IE 9 Browser.
In another case, the RadGrid must have paging enabled, but what I see are the grid rows also extending past the bottom of the browser screen with a vertical scroll bar. I can scroll the view to the bottom of the grid where the paging controls come partially into view. If I refresh the page or enlarge the browser height, I can see the entire paging row.
I would like the RadGrid to snap to the browser window and present the paging controls at the bottom. It makes no sense to me to have a grid with paging controls AND a vertical scroll bar on the side to scroll down to the paging controls.
How to I do that?
Thanks.
System.Drawing.Bitmap image = RadChart1.GetBitmap() as System.Drawing.Bitmap; image.SetResolution(300, 300); image.Save(@"C:\myimage.png");<script> function hideSearchFields(){ $("#searchDiv").slideUp('medium');}</script> <telerik:RadAjaxManager ID="radAjaxManager" runat="server"> <%--<ClientEvents OnResponseEnd="RadAjaxManagerResponseEnd" />--%> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="SearchLinkButton"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ResultsRadGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </AjaxSettings> </telerik:RadAjaxManager> </telerik:AjaxSetting><div id="searchDiv"> labels textboxes drop downs etc.... <asp:linkbutton id="SearchLinkButton" runat="server" OnClientClick="hideSearchFields();" OnClick="search" /></div><div> <telerik:radgrid id="ResultsRadGrid runat="server"> my grid </telerik:radgrid></div><div> a bunch more html</div> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Simple"> </telerik:RadAjaxLoadingPanel><telerik:RadGrid ID="grid1" ShowFooter="true" OnNeedDataSource="grid1_NeedDataSource" ShowStatusBar="true" runat="server" OnItemDataBound="GridCollateralDataBound" AllowFilteringByColumn="false"> <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" AllowColumnHide="true" ColumnsReorderMethod="Reorder"> <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="false" /> </ClientSettings> <Columns>
.......
</Columns> </telerik:RadGrid>void ButtonClick(object sender, EventArgs e) { System.IO.StringWriter stringWriter = new System.IO.StringWriter(); HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); grid1.RenderControl(htmlWriter); if (stringWriter != null) stringWriter.Dispose(); if (htmlWriter != null) htmlWriter.Dispose();This is fairly easy to accomplish using the <?hard-pagebreak?>.
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated If e.Item.ItemIndex Mod 7 = 0 AndAlso e.Item.ItemIndex > 1 AndAlso TypeOf e.Item Is GridDataItem Then e.Item.Attributes.Add("pageBreak", "pageBreak") End IfEnd SubProtected Sub RadGrid1_PdfExporting(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridPdfExportingArgs) Handles RadGrid1.PdfExporting Dim replacement As String = "</tbody></table><?hard-pagebreak?>" & _ "<table >" & _ "<colgroup>" & _ "<col />" & _ "<col />" & _ "</colgroup>" & _ "<thead>" & _ "<tr>" & _ "<th scope='col' > </th><th scope='col' >Print Column</th>" & _ "</tr>" & _ "</thead>" & _ "<tbody>" & _ "<tr " e.RawHTML = e.RawHTML.Replace("<tr pageBreak=""pageBreak""", replacement)
Dim FILE_NAME As String = "c:\inetpub\PDFServer\file.html" If System.IO.File.Exists(FILE_NAME) = True Then Dim objWriter As New System.IO.StreamWriter(FILE_NAME) objWriter.Write(e.RawHTML) objWriter.Close() End IfEnd Sub