Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
1.1K+ views

Build 2021.3.914.45, I've got a page that I dynamically add tabs and pageviews too, it's now throwing a maximum call stack size exceeded, NO changes at all to this page, and was working perfectly prior to the upgrade of controls.  The only change was upgrading to the specified version of controls.

Uncaught RangeError: Maximum call stack size exceeded

 

Vessy
Telerik team
 answered on 18 Oct 2021
1 answer
146 views

I have a RadDropDownList with countries ,based a client Event I have a javacript loop selecting the country I want,

I then have an OnselectedIndexchangevent which fires after the JS has selected the country ,however when the event fires it does not retrieve the item that was selected by the JS,(the Js is working correctly).It just returns the first item in the list,

I also tried to store the value of the country in a hidden field which doesn't appear on client side either.

Any solutions would be amazing.

Thank You,

Mohd
Top achievements
Rank 2
Iron
 answered on 15 Oct 2021
0 answers
306 views

Hi Guys,

I tried to find a solution for this, but I can't do it.

I have a RadGrid

                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowAutomaticUpdates="False" AllowMultiRowEdit="false" Width="100%" OnItemCreated="RadGrid1_ItemCreated" 
                    AllowSorting="True" DataSourceID="exampledatasource2" DataKeyNames="Example" AllowAutomaticDeletes="True"  OnItemCommand="RadGrid1_ItemCommand" CommandItemStyle-HorizontalAlign="Left" 
                    PageSize="30" OnPreRender="RadGrid1_PreRender">
                    <GroupingSettings CaseSensitive="false" />
                    <CommandItemStyle  CssClass="all" />
                    <ExportSettings IgnorePaging="true" ExportOnlyData="true" Excel-Format="Xlsx"></ExportSettings>
                    <MasterTableView AllowAutomaticDeletes="true" AutoGenerateColumns="False" EnableHeaderContextMenu="true" DataSourceID="exampledatasource2" AllowFilteringByColumn="True" EditMode="InPlace" DataKeyNames="Example" CommandItemSettings-ShowExportToExcelButton="True"  CommandItemDisplay="Top" CommandItemStyle-HorizontalAlign="Left" CommandItemSettings-ExportToExcelImageUrl="../images/icons/excel.gif">
                        <CommandItemSettings ExportToPdfText="Export to Pdf" ShowExportToExcelButton="True" ShowAddNewRecordButton="false"></CommandItemSettings>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>

 

but when I try to open the excel file, I get 2 alert windows:

1- 

We encountered a problem with content "RadgridExport (44) .xlsx" Do you want us to try to retrieve as much content as possible? If you trust the source of this book, click Yes

 

After click "Yes", I get this:

2-

"Excel has completed file-level validation and repair. Parts of this book may have been repaired or discarded.
Repaired records: Format of /xl/styles.xml part (Styles)"

 

This gives me problems, since in some cells (not all) the date format changes, the correct format is "dd/mm/YYYY", but some cells have the format "mm/dd/YYYY":

 

 

It is not a problem with the records in the database, as the data is fine. This is very strange since the formatting problem does not always occur.

I exported this excel several times and on the fifth try the dates were fine, although it still shows the 2 alert messages.

 

 

Any suggestions for this problem? Thanks in advanced.

 

Sebastian
Top achievements
Rank 1
 asked on 15 Oct 2021
1 answer
119 views
I have a value only with a date, for example: 2021/10/10, but when it shows in the agenda, it is 2021/10/09.

I would like you to just control the day and not the time as well.

Thank you very much in advance

Sorry for the automatic translation.
Fábio
Top achievements
Rank 1
Iron
 answered on 15 Oct 2021
0 answers
119 views
We have a RadGrid with many columns and would like to change the icon displayed beside each filter item ( "contains", "isnull", "isNotNull",etc) to an icon indicating what has been previous selected and applied.  I have set the imageurl, selectionurl,hoverurls in the codebehind and set EnableSelection to true.  Also verified viewstate is on.  However the menu never changes the icon beside the selected item. When I investigated it appears there is a single filter menu created client side and is re-used thus would expect this to require javascript to solve.  Are there any examples of changing the selectedURL or imageURL once the filter menu window is shown to the selected filter via javascript  ???   
Van
Top achievements
Rank 1
Iron
Iron
 asked on 14 Oct 2021
0 answers
68 views

Hello 

I'm using a RadFilter(dropdownFilter) in my ASP.Net Ajax application and noticed that upon changing the Field/Value , the change takes about 8-10 seconds to reflect..
When we change Filed/Value , a call or handler event is initiated  to the Telerik.Web.UI.Resource.axd and its taking time to get the response and render the control with selected Filed/Value. 

Any help on this is appreciated.

Attached the call that triggers to WebResource.axd .

Below my Scriptmanager configuration - 

<telerik:RadScriptManager ID="ScriptManager" runat="server" EnablePageMethods="false" EnableEmbeddedjQuery="false"
                        EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true"
                        EnableHandlerDetection="false" ScriptMode="Release" EnableScriptCombine="false" AsyncPostBackTimeout="600">
                        <Groups>
                            <telerik:ScriptReferenceGroup>
                                <Scripts>
                                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryExternal.js" />
                                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryPlugins.js" />
                                </Scripts>
                            </telerik:ScriptReferenceGroup>
                        </Groups>
                    </telerik:RadScriptManager>

Ayyappa
Top achievements
Rank 1
 asked on 14 Oct 2021
1 answer
137 views

Hello,

I am attempting to integrate the drag/drop feature into a RadTreeList. The dragging is enabled and seems to work great but when an item is dropped it attempts a postback but does not change position. I assume this is because I need to manually assign it a value in comparison to a parent item. Does anyone have any experience or examples they could provide to display this functionality better? The most I have found online was this brief article:

https://docs.telerik.com/devtools/aspnet-ajax/controls/treelist/items/items-drag-and-drop

My code:

       <telerik:RadTreeList ID="treeViewGrid" runat="server" DataKeyNames="ModuleId" CommandItemDisplay="Top" ParentDataKeyNames="ParentId" AutoGenerateColumns="false" EnableDragAndDrop="true">
            <ClientSettings AllowItemsDragDrop="true">
    <Selecting AllowItemSelection="True" />
                </ClientSettings>
            <Columns>

....

</columns>

....

 

Database:

moduleid
1
displayorder
1
moduletype
1
parentid
0
displayorder
2
moduletype
1
parentid
0
moduleid
2

 

 

My guess would be that there is a OnDropItem that runs server side where I can assign a new display order based on the previous order. Any help on this is appreciated! Thanks!

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 13 Oct 2021
0 answers
117 views

Hi Team,

I am getting console issue with getParentElement(),this shows element value as null

which affects all other functionalaities.


 function RadEditorElementDesignerModule(element) {
                    RadEditorElementDesignerModule.initializeBase(this, [element]);
                };

                RadEditorElementDesignerModule.prototype =
                {
                    initialize: function() {
                        RadEditorElementDesignerModule.callBaseMethod(this, 'initialize');
                        var selfPointer = this;
                        this.get_editor().add_selectionChange(function() { selfPointer.doSomething(); });
                        this.doSomething();
                    },
                    doSomething: function() {
                        var module = this.get_element();
                        Test.$('RadEditorElementDesignerModule').setInnerHTML('').hide();
                      
                        var selection = this.get_editor().getSelection();
                        
                        var element = selection.getParentElement();
                        if (element.designer) {
                       
                           if (designers[element.designer]) {
                                try {
                                    designers[element.designer](element, module);
                                    BDS.$('RadEditorElementDesignerModule').show();
                                }
                                catch (ex) { }
                            }
                        }
                    }


 

Error:

Uncaught TypeError: Cannot read properties of null (reading 'designer')
    at RadEditorElementDesignerModule.doSomething (Shell.aspx?
    at RadEditorElementDesignerModule.initialize
    at RadEditorElementDesignerModule.Sys$Component$endUpdate [as endUpdate] (VM4504 ScriptResource.axd:3685)
    at $create (VM4790 bds-min.js:3)
    at Telerik.Web.UI.Editor.ModulesManager.createModule (VM5225 ScriptResource.axd:391)
    at Telerik.Web.UI.Editor.ModulesManager.createModules (VM5225 ScriptResource.axd:375)
    at Telerik.Web.UI.Editor.ModulesManager.initialize (VM5225 ScriptResource.axd:365)
    at c.RadEditor.initialize (VM5221 ScriptResource.axd:8095)
    at c.RadEditor.Sys$Component$endUpdate [as endUpdate] (VM4504 ScriptResource.axd:3685)
    at Sys$_Application$endCreateComponents [as endCreateComponents] (VM4504 ScriptResource.axd:4897)
doSomething @ Shell.aspx?

 

Can anyone please help me what should I replace.

Sachita
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 13 Oct 2021
1 answer
551 views

I have done extensive research on this issue and have yet to find a solution that works. I have a simple RadGrid, 2 columns are Template Columns. Each of those 2 columns have a RadDropDownList (DDL) with SQL Data Sources. I would like the selection of the first DDL to define the data list of the second DDL. Also, this needs to work in Insert and Edit modes.

I am stuck at two instances, at one point the first DDL - after making a selection it posts-back and loses the selected item. It resets to "- Select -" and does not bind the second DDL with any data.

Another is when I get an error that states I can't use Eval, Bind, etc., to a non-databound control.

Please take a look at my code and point me in the correct direction!


						<telerik:RadGrid ID="rgvHDwithLoc" runat="server" AutoGenerateColumns="False" DataSourceID="sdsHDwithLoc" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="false" AutoGenerateEditColumn="False">

							<GroupingSettings CollapseAllTooltip="Collapse all groups" />

							<MasterTableView AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CommandItemDisplay="Top" DataKeyNames="owedRequestID" DataSourceID="sdsHDwithLoc" EditMode="EditForms">

								<CommandItemSettings ShowCancelChangesButton="false" ShowSaveChangesButton="false" />

								<Columns>

									<telerik:GridEditCommandColumn EditText="Edit" UpdateText="Update" CancelText="Cancel" HeaderText="Edit"></telerik:GridEditCommandColumn>

									<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="Delete Adjustment" FilterControlAltText="Filter delete column" HeaderText="Delete" UniqueName="delete">
									</telerik:GridButtonColumn>

									<telerik:GridBoundColumn DataField="owedRequestID" DataType="System.Int32" FilterControlAltText="Filter owedRequestID column" HeaderText="owedRequestID" ReadOnly="True" SortExpression="owedRequestID" UniqueName="owedRequestID" Display="false">
									</telerik:GridBoundColumn>

									<telerik:GridBoundColumn DataField="wageAdjRequestID" DataType="System.Int32" FilterControlAltText="Filter wageAdjRequestID column" HeaderText="wageAdjRequestID" SortExpression="wageAdjRequestID" UniqueName="wageAdjRequestID" Display="false" ReadOnly="true">
									</telerik:GridBoundColumn>

									<telerik:GridTemplateColumn DataField="sapWageCode" FilterControlAltText="Filter sapWageCode column" HeaderText="Wage Code" SortExpression="sapWageCode" UniqueName="sapWageCode">
										<EditItemTemplate>

											<telerik:RadDropDownList ID="ddlsapWageCode" runat="server" SelectedValue='<%# Bind("sapWageCode") %>' DataTextField="sapWageCodeAndName" DataValueField="sapWageCode" DataSourceID="sdsWageCode" Width="400" DefaultMessage="- Select -" AutoPostBack="True" CausesValidation="false" EnableViewState="true" OnSelectedIndexChanged="ddlsapWageCode_SelectedIndexChanged"></telerik:RadDropDownList>

										</EditItemTemplate>
										<ItemTemplate>
											<asp:Label ID="sapWageCodeLabel" runat="server" Text='<%# Eval("sapWageCode") %>'></asp:Label>
										</ItemTemplate>
									</telerik:GridTemplateColumn>

									<telerik:GridTemplateColumn DataField="sapAttnCode" FilterControlAltText="Filter sapAttnCode column" HeaderText="Attn Code" SortExpression="sapAttnCode" UniqueName="sapAttnCode">
										<EditItemTemplate>
											<telerik:RadDropDownList ID="ddlsapAttnCode" runat="server" DataTextField="sapAttnCodeAndName" DataValueField="sapAttnCode" Width="400" SelectedValue='<%# Eval("sapAttnCode")%>' DefaultMessage="- Select -"></telerik:RadDropDownList>
										</EditItemTemplate>
										<InsertItemTemplate>
											<telerik:RadDropDownList ID="ddlsapAttnCode" runat="server" DataTextField="sapAttnCodeAndName" DataValueField="sapAttnCode" Width="400" DefaultMessage="- Select -"></telerik:RadDropDownList>
										</InsertItemTemplate>
										<ItemTemplate>
											<asp:Label ID="sapAttnCodeLabel" runat="server" Text='<%# Eval("sapAttnCode") %>'></asp:Label>
										</ItemTemplate>
									</telerik:GridTemplateColumn>

									<telerik:GridBoundColumn DataField="sapWorkCenter" FilterControlAltText="Filter sapWorkCenter column" HeaderText="Work Center" SortExpression="sapWorkCenter" UniqueName="sapWorkCenter">
									</telerik:GridBoundColumn>

									<telerik:GridBoundColumn DataField="sapDept" FilterControlAltText="Filter sapDept column" HeaderText="Dept" SortExpression="sapDept" UniqueName="sapDept">
									</telerik:GridBoundColumn>

									<telerik:GridBoundColumn DataField="Hours" DataType="System.Decimal" FilterControlAltText="Filter Hours column" HeaderText="Hours" SortExpression="Hours" UniqueName="Hours">
									</telerik:GridBoundColumn>

									<telerik:GridBoundColumn DataField="RatePay" DataType="System.Decimal" FilterControlAltText="Filter RatePay column" HeaderText="RatePay" SortExpression="RatePay" UniqueName="RatePay">
									</telerik:GridBoundColumn>

									<telerik:GridDateTimeColumn DataField="Date" DataType="System.DateTime" FilterControlAltText="Filter Date column" HeaderText="Date" SortExpression="Date" UniqueName="Date" DataFormatString="{0:d}">
									</telerik:GridDateTimeColumn>

									<telerik:GridTemplateColumn DataField="sapJobCode" FilterControlAltText="Filter sapJobCode column" HeaderText="Job Code" SortExpression="sapJobCode" UniqueName="sapJobCode">
										<EditItemTemplate>
											<telerik:RadDropDownList ID="ddlsapJobCode" runat="server" DataSourceID="sdsJobCode" DataTextField="sapJobCodeAndName" DataValueField="sapJobCode" SelectedValue='<%# Bind("sapJobCode") %>' Width="400" DefaultMessage="- Select -"></telerik:RadDropDownList>
										</EditItemTemplate>
										<ItemTemplate>
											<asp:Label ID="sapJobCodeLabel" runat="server" Text='<%# Eval("sapJobCode") %>'></asp:Label>
										</ItemTemplate>
									</telerik:GridTemplateColumn>
								</Columns>

								<EditFormSettings>
									<EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
									</EditColumn>
								</EditFormSettings>

							</MasterTableView>

						</telerik:RadGrid>

<asp:SqlDataSource ID="sdsHDwithLoc" runat="server" ConnectionString="<%$ ConnectionStrings:XXXXXX_SAP %>"
		DeleteCommand="DELETE FROM [tblSAP_HoursDollarsOwedRequest] WHERE [owedRequestID] = @owedRequestID"
		SelectCommand="SELECT * FROM view_SAP_WageAdjRequest_hoursDollarsOwed WHERE (wageAdjRequestID = @wageAdjRequestID)"
		UpdateCommand="UPDATE tblSAP_HoursDollarsOwedRequest SET sapWageCode = @sapWageCode, sapAttnCode = @sapAttnCode, sapWorkCenter = @sapWorkCenter, sapDept = @sapDept, Hours = @Hours, RatePay = @RatePay, sapJobCode = @sapJobCode, Date = @Date  WHERE (owedRequestID = @owedRequestID)"
		InsertCommand="INSERT INTO tblSAP_HoursDollarsOwedRequest (wageAdjRequestID, sapWageCode, sapAttnCode, sapWorkCenter, sapDept, Hours, RatePay, sapJobCode, [Date]) VALUES (@wageAdjRequestID, @sapWageCode, @sapAttnCode, @sapWorkCenter, @sapDept, @Hours, @RatePay, @sapJobCode, @Date)">
		<SelectParameters>
			<asp:ControlParameter ControlID="lblWageAdjID" PropertyName="Text" Name="wageAdjRequestID" Type="Int32" />
		</SelectParameters>
		<DeleteParameters>
			<asp:Parameter Name="owedRequestID" Type="Int32" />
		</DeleteParameters>
		<UpdateParameters>
			<asp:Parameter Name="sapWageCode" Type="String" />
			<asp:Parameter Name="sapAttnCode" Type="String" />
			<asp:Parameter Name="sapWorkCenter" Type="String" />
			<asp:Parameter Name="sapDept" Type="String" />
			<asp:Parameter Name="Hours" Type="Decimal" />
			<asp:Parameter Name="RatePay" Type="Decimal" />
			<asp:Parameter Name="sapJobCode" Type="String" />
			<asp:Parameter Name="Date" Type="DateTime" />
			<asp:Parameter Name="owedRequestID" Type="Int32" />
		</UpdateParameters>
		<InsertParameters>
			<asp:ControlParameter ControlID="lblWageAdjID" PropertyName="text" Name="wageAdjRequestID" Type="Int32" />
			<asp:Parameter Name="sapWageCode" Type="String" />
			<asp:Parameter Name="sapAttnCode" Type="String" />
			<asp:Parameter Name="sapWorkCenter" Type="String" />
			<asp:Parameter Name="sapDept" Type="String" />
			<asp:Parameter Name="Hours" Type="Decimal" />
			<asp:Parameter Name="RatePay" Type="Decimal" />
			<asp:Parameter Name="sapJobCode" Type="String" />
			<asp:Parameter Name="Date" Type="DateTime" />
		</InsertParameters>
	</asp:SqlDataSource>

<asp:SqlDataSource ID="sdsWageCode" runat="server" ConnectionString="<%$ ConnectionStrings:XXXXXX_SAP %>"
		SelectCommand="SELECT [sapWageCode], sapWageCode + ' - ' + sapWageCodeName AS sapWageCodeAndName FROM [tblSAP_WageCode] WHERE [sapWageCodeActive] = 1 ORDER BY [sapWageCodeName]"></asp:SqlDataSource>

	<asp:SqlDataSource ID="sdsAttnCode" runat="server" ConnectionString="<%$ ConnectionStrings:XXXXXX_SAP %>"
		SelectCommand="SELECT [sapAttnCode], sapAttnCode + ' - ' + sapAttnCodeName AS sapAttnCodeAndName FROM [tblSAP_AttnCode] WHERE [sapAttnCodeActive] = 1 AND sapWageCode = @sapWageCode">
		<SelectParameters>
			<asp:ControlParameter ControlID="ddlsapWageCode" PropertyName="SelectedValue" Name="sapWageCode" Type="String" />
		</SelectParameters>
	</asp:SqlDataSource>

And I have tried this in my VB code behind:


Protected Sub ddlsapWageCode_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)

		Dim wageCodeDDL As RadDropDownList = CType(sender, RadDropDownList)
		Dim insertItem As GridEditFormInsertItem = CType(wageCodeDDL.NamingContainer, GridEditFormInsertItem)
		Dim attnCodeDDL As RadDropDownList = CType(insertItem.FindControl("ddlsapAttnCode"), RadDropDownList)
		Dim strWageCode = wageCodeDDL.SelectedValue.ToString

		Dim strAttnCode As String = Nothing
		Dim strAttnCodeAndName As String = Nothing

		Dim myConn As New SqlConnection(ConfigurationManager.ConnectionStrings("XXXXXX_SAP").ConnectionString)
		Dim strSelect As String = "SELECT [sapAttnCode], sapAttnCode + ' - ' + sapAttnCodeName AS sapAttnCodeAndName FROM [tblSAP_AttnCode] WHERE [sapAttnCodeActive] = 1 AND sapWageCode = @sapWageCode"
		Dim myCmd As New SqlCommand(strSelect, myConn)

		myConn.Open()

		With myCmd.Parameters
			.Add(New SqlParameter("@sapWageCode", strWageCode))
		End With

		Dim dr As SqlDataReader = myCmd.ExecuteReader

		While dr.Read
			strAttnCode = dr("sapAttnCode")
			strAttnCodeAndName = dr("sapAttnCodeAndName")
		End While

		myConn.Close()
		myCmd.Dispose()
		myConn.Dispose()
		dr.Close()

		attnCodeDDL.DataValueField = strAttnCode
		attnCodeDDL.DataTextField = strAttnCodeAndName

		attnCodeDDL.DataBind()

	End Sub
Thank you in advance!
Attila Antal
Telerik team
 answered on 12 Oct 2021
1 answer
235 views

Can the Radgrid print function print a multi page grid?

My grid just prints out the first page - it is more like a print screen function  than a print grid function.

 

Thank You

 

Doug Juola

djuola@cox.net

Vessy
Telerik team
 answered on 12 Oct 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?