HtmlForm
form = new HtmlForm();
form.Controls.Add(MyRadGrid1);
StringWriter sw = new StringWriter();
HtmlTextWriter hTextWriter = new HtmlTextWriter(sw);
form.Controls[0].RenderControl(hTextWriter);
I am getting several errors during the 'form.Controls[0].RenderControl(hTextWriter)' .
This code is unable to render all the telerik controls in the RadGrid.
Is there any other way that this could be achieved? Should i look into other options that will be better than itextSharp ?
Thanks in advance.
Hello!
I have a grid with frozen columns and grouping. When the grid loads without horizontal scrolling and has hidden columns, I discovered two problems:
1) after displaying hidden columns manually and when horizontal scrolling becomes available - we can scroll the grid data, but the grid headers do not scroll
2) the “colspan” parameter is incorrectly calculated if some columns were hidden when the page was loaded.
it is my .aspx code:
01.<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TelerikWebApp1._Default" %>02. 03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">04. 05.<html xmlns="http://www.w3.org/1999/xhtml">06.<head runat="server">07. <title></title>08. <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />09.</head>10.<body>11. <form id="form1" runat="server">12. <telerik:RadScriptManager ID="RadScriptManager1" runat="server">13. <Scripts>14. <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />15. <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />16. <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />17. </Scripts>18. </telerik:RadScriptManager>19. <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" EnableHeaderContextMenu="true"20. ClientSettings-ClientEvents-OnColumnShown="ColumnShown" ClientSettings-ClientEvents-OnColumnHidden="ColumnHidden">21. <ClientSettings>22. <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="4"></Scrolling>23. </ClientSettings>24. <MasterTableView ></MasterTableView>25. <HeaderStyle Width="200px" />26. </telerik:RadGrid>27. <script type="text/javascript">28. //Put your JavaScript code here.29. function ColumnHidden(sender, eventArgs) {}30. function ColumnShown(sender, eventArgs) {}31. </script>32. <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">33. </telerik:RadAjaxManager>34. <div>35. 36. </div>37. </form>38.</body>39.</html>and it is my .vb code
001.Imports Telerik.Web.Data002.Imports Telerik.Web.UI003. 004.Partial Class _Default005. Inherits System.Web.UI.Page006. 007. Private Sub _Default_LoadComplete(sender As Object, e As EventArgs) Handles Me.LoadComplete008. RadGrid1.MasterTableView.GetColumnSafe("Custom1").Display = False009. RadGrid1.MasterTableView.GetColumnSafe("Custom2").Display = False010. RadGrid1.MasterTableView.GetColumnSafe("Custom3").Display = False011. RadGrid1.MasterTableView.GetColumnSafe("Custom4").Display = False012. RadGrid1.MasterTableView.GetColumnSafe("Custom5").Display = False013. RadGrid1.MasterTableView.GetColumnSafe("Custom6").Display = False014. RadGrid1.MasterTableView.GetColumnSafe("Custom7").Display = False015. RadGrid1.MasterTableView.GetColumnSafe("Custom8").Display = False016. RadGrid1.MasterTableView.GetColumnSafe("Custom9").Display = False017. 'RadGrid1.MasterTableView.GetColumnSafe("MainMaterial").Display = False018. RadGrid1.MasterTableView.GetColumnSafe("ComponentOrder").Display = False019. End Sub020. 021. Private Sub _Default_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender022. 023. End Sub024. 025. Private Sub RadGrid1_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource026. Dim list As List(Of PersonData) = New List(Of PersonData)027. list.Add(New PersonData(1, "Name1", 11, "", "", "", "", "", "", "", "", "", "1", "Test", 1))028. list.Add(New PersonData(2, "Name2", 12, "", "", "", "", "", "", "", "", "", "1", "Test", 1))029. list.Add(New PersonData(3, "Name3", 13, "", "", "", "", "", "", "", "", "", "1", "Test", 0))030. list.Add(New PersonData(4, "Name4", 14, "", "", "", "", "", "", "", "", "", "1", "Test", 0))031. RadGrid1.DataSource = list032. 033. RadGrid1.GroupingEnabled = True034. RadGrid1.GroupingSettings.ShowUnGroupButton = False035. RadGrid1.ShowGroupPanel = False036. RadGrid1.GroupingSettings.GroupContinuesFormatString = ""037. 038. RadGrid1.MasterTableView.GroupByExpressions.Clear()039. Dim selfield As GridGroupByField = New GridGroupByField()040. selfield.FieldName = "MainMaterial"041. 'Do not use GetsystemText here its defined in Itemdatabound.042. selfield.HeaderText = "Main Material"043. Dim grpfield As GridGroupByField = New GridGroupByField()044. grpfield.FieldName = "MainMaterial"045. grpfield.SortOrder = GridSortOrder.Descending046. Dim expression3 As GridGroupByExpression = New GridGroupByExpression()047. expression3.GroupByFields.Add(grpfield)048. expression3.SelectFields.Add(selfield)049. RadGrid1.MasterTableView.GroupByExpressions.Add(expression3)050. Dim selfield2 As GridGroupByField = New GridGroupByField()051. selfield2.FieldName = "ComponentDescription"052. selfield2.HeaderText = "Material Type"053. Dim grpfield2 As GridGroupByField = New GridGroupByField() With {.FieldName = "ComponentOrder"}054. Dim grpfield3 As GridGroupByField = New GridGroupByField() With {.FieldName = "ComponentDescription"}055. Dim expression4 As GridGroupByExpression = New GridGroupByExpression()056. expression4.GroupByFields.Add(grpfield2)057. expression4.GroupByFields.Add(grpfield3)058. expression4.SelectFields.Add(selfield2)059. RadGrid1.MasterTableView.GroupByExpressions.Add(expression4)060. 061. End Sub062. 063. Public Class PersonData064. Private _ID As Int16065. Private _Name As String066. Private _Age As Int16067. Private _Custom1 As String068. Private _Custom2 As String069. Private _Custom3 As String070. Private _Custom4 As String071. Private _Custom5 As String072. Private _Custom6 As String073. Private _Custom7 As String074. Private _Custom8 As String075. Private _Custom9 As String076. 077. Private _MainMaterial As Int16078. Private _ComponentOrder As String079. Private _ComponentDescription As String080. 081. Public Sub New(ByVal id As Int16, ByVal name As String, ByVal age As Int16,082. ByVal custom1 As String,083. ByVal custom2 As String,084. ByVal custom3 As String,085. ByVal custom4 As String,086. ByVal custom5 As String,087. ByVal custom6 As String,088. ByVal custom7 As String,089. ByVal custom8 As String,090. ByVal custom9 As String,091. ByVal componentOrder As String,092. ByVal componentDescription As String,093. ByVal mainMaterial As Int16)094. 095. _ID = id096. _Name = name097. _Age = age098. 099. _ComponentOrder = componentOrder100. _ComponentDescription = componentDescription101. _MainMaterial = mainMaterial102. 103. End Sub104. 105. Public Property ID() As Int16106. Get107. Return _ID108. End Get109. Set(ByVal Value As Int16)110. _ID = Value111. End Set112. End Property113. 114. Public Property MainMaterial() As Int16115. Get116. Return _MainMaterial117. End Get118. Set(ByVal Value As Int16)119. _MainMaterial = Value120. End Set121. End Property122. 123. Public Property ComponentOrder() As String124. Get125. Return _ComponentOrder126. End Get127. Set(ByVal Value As String)128. _ComponentOrder = Value129. End Set130. End Property131. 132. Public Property ComponentDescription() As String133. Get134. Return _ComponentDescription135. End Get136. Set(ByVal Value As String)137. _ComponentDescription = Value138. End Set139. End Property140. 141. Public Property Name() As String142. Get143. Return _Name144. End Get145. Set(ByVal Value As String)146. _Name = Value147. End Set148. End Property149. 150. Public Property Custom1() As String151. Get152. Return _Custom1153. End Get154. Set(ByVal Value As String)155. _Custom1 = Value156. End Set157. End Property158. 159. Public Property Custom2() As String160. Get161. Return _Custom2162. End Get163. Set(ByVal Value As String)164. _Custom2 = Value165. End Set166. End Property167. 168. Public Property Custom3() As String169. Get170. Return _Custom3171. End Get172. Set(ByVal Value As String)173. _Custom3 = Value174. End Set175. End Property176. 177. Public Property Custom4() As String178. Get179. Return _Custom4180. End Get181. Set(ByVal Value As String)182. _Custom4 = Value183. End Set184. End Property185. 186. Public Property Custom5() As String187. Get188. Return _Custom5189. End Get190. Set(ByVal Value As String)191. _Custom5 = Value192. End Set193. End Property194. 195. Public Property Custom6() As String196. Get197. Return _Custom6198. End Get199. Set(ByVal Value As String)200. _Custom6 = Value201. End Set202. End Property203. 204. Public Property Custom7() As String205. Get206. Return _Custom7207. End Get208. Set(ByVal Value As String)209. _Custom7 = Value210. End Set211. End Property212. 213. Public Property Custom8() As String214. Get215. Return _Custom8216. End Get217. Set(ByVal Value As String)218. _Custom8 = Value219. End Set220. End Property221. 222. Public Property Custom9() As String223. Get224. Return _Custom9225. End Get226. Set(ByVal Value As String)227. _Custom9 = Value228. End Set229. End Property230. 231. Public Property Age() As Int16232. Get233. Return _Age234. End Get235. Set(ByVal Value As Int16)236. _Age = Value237. End Set238. End Property239. 240. End Class241. 242.End Class
And also I have a question about the work of the grouping. In our project we have a lot of grids, and all of them have the same markup(it is example https://prnt.sc/ndptj5), but the two grids have a different markup to grouping the rows(it is different example https://prnt.sc/ndpw3r). I do not know which parameter makes these changes, can you help me?
I am using the latest version of Telerik - 2019.1.215.45
Hi,
Code snippets coming after remove table style from insert table popup in chrome,ie,ff.
I am facing a big problem in editor please give any solution.
Link: https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
Steps to reproduce
Step 1
Try to insert table from Insert Table from editor toolbar.
Step 2
Right click on cell then click on Table/cell properties. A table wizard popup will come.
Step 3
Click on Table Layouts tab on the table wizard popup.
Step 4
Select any value from table styles drop down.
Step 5
Now you can see TABLE>TR>TD>RemoveElement on the bottom of the editor.click on RemoveElement .
After click on RemoveElement you can see STYLE>RemoveElement again click on RemoveElement.
then you can see like below in the editor.
.telerik-reTable-2 { border-collapse: collapse; border: solid 0px; font-family: Tahoma; } .telerik-reTable-2 tr.telerik-reTableHeaderRow-2 { border-width: 1.0pt 1.0pt 3.0pt 1.0pt...........


var currentLoadingPanel = null;
var currentControl = null;
function ShowLoading() { currentControl = $find("<%= uxRGC.ClientID %>"); currentLoadingPanel = $find('<%= RadAjaxLoadingPanel1.ClientID %>'); currentLoadingPanel.show(currentControl);}function HideLoading() { if (currentLoadingPanel != null) { currentLoadingPanel.hide(currentUpdatedControl); } currentUpdatedControl = null; currentLoadingPanel = null;}

Hi there,
I'm trying to get a RadTreeList to create a child record on the next hierarchical level. I have EditMode="InPlace". I want to place the edit area to properly reflect where the child record will be placed, and I have attached pictures below with what I currently have and what I want.
Currently, the edit area appears on the same level as the record that the insert button was clicked. I need it to appear on the next level of nesting directly under the parent record, along with the appropriate tree lines.
Ideally I'd like a server-side implementation. Does anyone know if this is possible and if so, how I would be able to do it?
Thanks
ASPX:
<telerik:RadTreeList RenderMode="Lightweight" runat="server" ID="radTree" DataKeyNames="ID,PartNum" ParentDataKeyNames="ParentID,ParentPartNum" AutoGenerateColumns="false" EditMode="InPlace" OnNeedDataSource="radTree_NeedDataSource" OnItemDataBound="radTree_ItemDataBound" OnUpdateCommand="radTree_UpdateCommand" OnDeleteCommand="radTree_DeleteCommand" OnInsertCommand="radTree_InsertCommand" OnItemCreated="radTree_ItemCreated" OnItemSelected="" OnItemCommand="radTree_ItemCommand" OnTreeShowingEditor="" ExpandCollapseMode="Server" Width="100%" Skin="Windows7"> <Columns> <telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn" ButtonType="FontIconButton" HeaderStyle-Width="80px" AddRecordText="Add child part" EditText="Edit part"> </telerik:TreeListEditCommandColumn> <telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete" HeaderStyle-Width="40px" ButtonType="FontIconButton" ToolTip="Delete part"> </telerik:TreeListButtonColumn> <telerik:TreeListBoundColumn DataField="ParentID" HeaderText="ParentID" UniqueName="ParentPath" Visible="false"> <HeaderStyle Width="200px"></HeaderStyle> </telerik:TreeListBoundColumn> <telerik:TreeListBoundColumn DataField="ParentPartNum" HeaderText="ParentPartNum" UniqueName="ParentPartNum" Visible="false"> <HeaderStyle Width="200px"></HeaderStyle> </telerik:TreeListBoundColumn> <telerik:TreeListBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false"> <HeaderStyle Width="200px"></HeaderStyle> </telerik:TreeListBoundColumn> <telerik:TreeListTemplateColumn UniqueName="PartNum" DataField="PartNum" HeaderText="Part Number" HeaderStyle-Width="300px"> <ItemTemplate> <asp:Literal Text='<%#Eval("PartNum").ToString() %>' runat="server" ID="PartNum"></asp:Literal> </ItemTemplate> <EditItemTemplate> <div style="display: inline-block"> <telerik:RadTextBox ID="txtPartNum" runat="server" Width="100px" Text='<%# Bind("PartNum")%>' /> <telerik:RadButton ID="radBtnSearch" runat="server" Text="Search" CommandName="openSearchErpPart" OnClientClicking="openSearchErpPart" /> </div> </EditItemTemplate> </telerik:TreeListTemplateColumn> </Columns> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="400px" /> <Selecting AllowItemSelection="true" /> <ClientEvents OnItemClick="itemClick" /> </ClientSettings></telerik:RadTreeList>
Hi,I am having an issue where the horizontal scrollbar disappears at times or returns in the wrong spot. I can still use my mouse and scroll even when it is not visible. The exact symptom is attached in images below. The issue occurs in edge, but not in chrome. I have not checked firefox. Also, the issue appears to go away when I remove the 2 frozen columns, but I really need those. The code for the grid is below, but I did change the uniquenames, sortexpressions, and headertext for privacy. Any ideas on how to fix this is greatly appreciated. Thank you.
<div style="width:98%;height:73%;background-color:white;"> <telerik:RadGrid RenderMode="Lightweight" ID="gvFilter" runat="server" GridLines="Vertical" AllowMultiRowSelection="true" OnPreRender="gvFilter_PreRender" AllowSorting="true" AllowPaging="true" GroupingEnabled="false" PageSize="20" Height="100%" OnSortCommand="gvFilter_SortCommand" OnItemDataBound="gvFilter_ItemDataBound" EnableViewState="true" CssClass="RadGrid_Bootstrap" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" OnItemCommand="gvFilter_ItemCommand" EnableEmbeddedSkins="false" AutoGenerateColumns="false" OnNeedDataSource="gvFilter_NeedDataSource" OnItemCreated="gvFilter_ItemCreated" AllowFilteringByColumn="true" FilterType="HeaderContext" OnFilterCheckListItemsRequested="gvFilter_FilterCheckListItemsRequested" > <MasterTableView AllowMultiColumnSorting="true" IsFilterItemExpanded="true"> <Columns> <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" EnableHeaderContextMenu="false"></telerik:GridClientSelectColumn> <telerik:GridTemplateColumn UniqueName="FileStatus" SortExpression="FileStatus" HeaderText="Status" DataField="FileStatus" FilterCheckListEnableLoadOnDemand="true"> <ItemTemplate> <asp:HyperLink runat="server" Text='<%# Eval("FileStatus") %>' NavigateUrl='<%# Eval("fkBatchPDFID", "../ViewReport.aspx?id={0}") %>' Visible='<%# Eval("FileStatus").ToString() == "Ready" %>' Target="_blank" /> <asp:Label Text='<%# Eval("FileStatus") %>' Visible='<%# Eval("FileStatus").ToString() != "Ready" %>' runat="server" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="Shared" DataField="Shared" SortExpression="Shared" HeaderText="Shared" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="A" DataField="A" SortExpression="A" HeaderText="A" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="B" DataField="B" SortExpression="B" HeaderText="B" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="C" DataField="C" SortExpression="C" HeaderText="C" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="D" DataField="D" SortExpression="D" HeaderText="D" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="E" DataField="E" SortExpression="E" HeaderText="E" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="F" DataField="F" SortExpression="F" HeaderText="F" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="G" DataField="G" SortExpression="G" HeaderText="G" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="H" DataField="H" SortExpression="H" HeaderText="H" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="I" DataField="I" SortExpression="I" HeaderText="I" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="J" DataField="J" SortExpression="J" HeaderText="J" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="K" DataField="K" SortExpression="K" HeaderText="K" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="L" DataField="L" SortExpression="L" HeaderText="L" FilterCheckListEnableLoadOnDemand="true"/> <telerik:GridBoundColumn UniqueName="M" DataField="M" SortExpression="M" HeaderText="M" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="N" DataField="N" SortExpression="N" HeaderText="N" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="O" DataField="O" SortExpression="O" HeaderText="O" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="P" DataField="P" SortExpression="P" HeaderText="P" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="Q" DataField="Q" SortExpression="Q" HeaderText="Q" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="R" DataField="R" SortExpression="R" HeaderText="R" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="S" DataField="S" SortExpression="S" HeaderText="S" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="T" DataField="T" SortExpression="T" HeaderText="T" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="U" DataField="U" SortExpression="U" HeaderText="U" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="V" DataField="V" SortExpression="V" HeaderText="V" FilterCheckListEnableLoadOnDemand="true" /> <telerik:GridBoundColumn UniqueName="W" DataField="W" SortExpression="W" Display="false" HeaderText="ID1" EnableHeaderContextMenu="false" /> <telerik:GridBoundColumn UniqueName="X" DataField="X" SortExpression="X" Display="false" HeaderText="ID2" EnableHeaderContextMenu="false" /> </Columns> </MasterTableView> <ClientSettings ReorderColumnsOnClient="true" > <Scrolling AllowScroll="True" ScrollHeight="100%" UseStaticHeaders="True" FrozenColumnsCount="2"></Scrolling> <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"></Selecting> </ClientSettings> <PagerStyle AlwaysVisible="true" PageSizeControlType="None"></PagerStyle> <FilterMenu EnableEmbeddedSkins="false" CssClass="RadFilter_Bootstrap" ></FilterMenu> <HeaderContextMenu EnableEmbeddedSkins="false" CssClass="RadMenu_Bootstrap" ></HeaderContextMenu> </telerik:RadGrid> </div>I'v been searching at this for a while now, but can't seem to find the solutions.
I have a Paginated RadGrid with grouped items. Everything works fine, including the {continues on next page} and {continued from previous page} messages.
However, I'm adding a button + use custom text (Label) in the header by using <GroupHeaderTemplate>.
No matter how I set the groupsettings, I fail to get any continuation message to appear.
What would be the way to keep the default functionality but use a GroupHeaderTemplate? Or do I need to edit the header from code behind?(I prefer not to use the ItemDataBound/ItemCreated/PreRender events to customize the header as I've encountered inconsistencies trying it that way)
Hello,
I have a cell context menu on my Pivot Grid and I want to add an option to view the data that compound that cell value.
As for exemple on my attached file: I want to right click on value "1784,00", open the context menu and hit "View". Then I should query by the filters "LANÇAMENTO MANUAL" (row), "APM TERMINALS ITAJAI S.A" (row) and "APMT SERVIÇOS RETROPORTUARIOS LTDA" (column) to retrieve the data that corresponds to the total "1784,00", but I don't know how to get the rows & columns values of the selected cell.
Is there a way to achieve that?