<telerik:RadAsyncUpload ID="radAsyncUpload" CssClass="hide4print" runat="server" MaxFileInputsCount="10" InitialFileInputsCount="1" MultipleFileSelection="Automatic" OnValidatingFile="RadAsyncUpload_ValidatingFile" />
I am getting this script error in Chrome 67.0.3396.99 when I click a button to edit a column of RadGrid using a custom form template with EditFormType="WebUserControl". None of the RadNumericTextBox controls seem to work because of the error.
I have EditMode=PopUp and RenderMode="Auto" which works fine in standard desktop size/mode where I get a popup. However, I get this error simulating mobile devices when an inline form is displayed instead of a popup:
Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6 Uncaught TypeError: Cannot set property 'control' of undefined
at c.RadListBox.Sys.UI.Control (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
at Function.Type.initializeBase (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
at c.RadListBox.Telerik.Web.UI.RadWebControl (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:1062)
at Function.Type.initializeBase (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
at c.RadListBox.b.ControlItemContainer (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:12987)
at Function.Type.initializeBase (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
at new c.RadListBox (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:13923)
at Sys.Component.create (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
at <
anonymous
>:6:5
at Sys._Application.add_init (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=cntMain_sm1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a83235d95-72c5-4004-91af-69fb711f39d0%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2018.2.710.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8b7d6a7a-6133-413b-b622-bbc1f3ee15e4%3a16e4e7cd%3aed16cbdc%3af7645509%3a88144a7a%3a33715776%3a24ee1bba%3a56e9f55f%3a2a733ecd%3ab7778d6c%3ae085fe68%3af46195d3%3a2003d0b8%3a1e771326%3a2bef5fcc%3aa9b7ace7:6)
The issue appears to be with RadListBox. I'm not using any RadListBox so it must be a control rendered automatically by Telerik software.
I tried updating to the latest Telerik controls (2018.2.710). I tried changing my popup controls from ClientIdMode=Static to ClientIdMode=Auto. I tried adding my popup controls to the list of <UpdatedControls> in <telerik:AjaxSetting AjaxControlID="RadGrid1">. I tried disabling compression in both page and popup. I followed links to several forum posts but have been unable to resolve the issue. What would you suggest? Thanks!
Here is the content of my popup (AdjustInventoryQuantity.ascx):
<
asp:HiddenField
runat
=
"server"
id
=
"quantityAtPageLoad"
ClientIDMode
=
"Static"
value='<%#DataBinder.Eval(Container, "DataItem.CurrentQuantity")%>'/>
<
asp:HiddenField
runat
=
"server"
id
=
"InventoryId"
value='<%#DataBinder.Eval(Container, "DataItem.InventoryId")%>'/>
<
div
class
=
"col-xs-12 pad-5"
>
<
telerik:RadNumericTextBox
runat
=
"server"
RenderMode
=
"Lightweight"
CssClass
=
"InventoryQuantity"
ShowSpinButtons
=
"true"
ID
=
"txtCurrentQuantity"
Text='<%#DataBinder.Eval(Container, "DataItem.CurrentQuantity")%>' width="100%" textmode="Number " MinValue="0" MaxValue="2147483647">
<
ClientEvents
OnValueChanged
=
"AdjustAdjustment"
/>
<
NumberFormat
GroupSeparator
=
""
DecimalDigits
=
"0"
KeepNotRoundedValue
=
"True"
></
NumberFormat
>
</
telerik:RadNumericTextBox
>
</
div
>
<
div
class
=
"col-xs-12 pad-5"
>
<
telerik:RadNumericTextBox
runat
=
"server"
RenderMode
=
"Lightweight"
cssclass
=
"InventoryAdjustment"
ShowSpinButtons
=
"true"
ID
=
"txtAdjustment"
MaxLength
=
"11"
textmode
=
"Number"
width
=
"100%"
Placeholder
=
"Enter Adjustment"
MinValue
=
"-2147483648"
MaxValue
=
"2147483647"
>
<
ClientEvents
OnValueChanged
=
"AdjustCurrentQuantity"
/>
<
NumberFormat
GroupSeparator
=
""
DecimalDigits
=
"0"
KeepNotRoundedValue
=
"True"
></
NumberFormat
>
</
telerik:RadNumericTextBox
>
</
div
>
<
div
class
=
"col-xs-12 pad-5"
>
<
telerik:RadTextBox
runat
=
"server"
RenderMode
=
"Lightweight"
TextMode
=
"MultiLine"
ID
=
"txtDescription"
Placeholder
=
"Enter Description"
width
=
"100%"
rows
=
"2"
CssClass
=
"AdjustInventoryQuantity"
Text='<%#DataBinder.Eval(Container, "DataItem.CurrentQuantityDescription")%>'/>
</
div
>
<
div
class
=
"col-xs-12 pad-5"
>
<
asp:Button
runat
=
"server"
ID
=
"btnSubmit"
Text
=
"Save"
CommandName
=
"Update"
CssClass
=
"btn btn-success btn-block btn-lg "
OnClick
=
"Save"
/>
<
asp:Button
runat
=
"server"
ID
=
"btnCancel"
Text
=
"Cancel"
CssClass
=
"btn btn-default btn-block btn-lg"
CommandName
=
"Cancel"
OnClick
=
"Cancel"
CausesValidation
=
"false"
/>
</
div
>
Here is the content of my page:
01.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
02.
<
AjaxSettings
>
03.
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
04.
<
UpdatedControls
>
05.
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
06.
</
UpdatedControls
>
07.
</
telerik:AjaxSetting
>
08.
</
AjaxSettings
>
09.
</
telerik:RadAjaxManager
>
10.
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
skin
=
"Default"
>
11.
</
telerik:RadAjaxLoadingPanel
>
12.
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
EnableAJAX
=
"True"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
ClientEvents-OnRequestStart
=
"pnlRequestStarted"
>
13.
<
telerik:RadPersistenceManagerProxy
runat
=
"server"
ID
=
"RadPersistenceManagerProxy1"
UniqueKey
=
"Inventories"
>
14.
<
PersistenceSettings
>
15.
<
telerik:PersistenceSetting
ControlID
=
"RadGrid1"
/>
16.
</
PersistenceSettings
>
17.
</
telerik:RadPersistenceManagerProxy
>
18.
<
telerik:RadGrid
OnPreRender
=
"RadGrid1_OnPreRender"
RenderMode
=
"Auto"
ID
=
"RadGrid1"
GridLines
=
"None"
onitemdatabound
=
"RadGrid1_OnItemDataBound"
OnItemCommand
=
"RadGrid1_OnItemCommand"
AllowFilteringByColumn
=
"true"
runat
=
"server"
FilterType
=
"HeaderContext"
EnableHeaderContextMenu
=
"true"
skin
=
"Bootstrap"
19.
EnableHeaderContextFilterMenu
=
"true"
AllowPaging
=
"False"
OnFilterCheckListItemsRequested
=
"RadGrid1_FilterCheckListItemsRequested"
AllowSorting
=
"true"
GroupingEnabled
=
"true"
>
20.
<
ExportSettings
FileName
=
"Inventory"
IgnorePaging
=
"True"
SuppressColumnDataFormatStrings
=
"True"
ExportOnlyData
=
"True"
OpenInNewWindow
=
"True"
>
21.
<
Excel
Format
=
"Xlsx"
/>
22.
</
ExportSettings
>
23.
<
MasterTableView
CssClass
=
"InventoryGrid"
AutoGenerateColumns
=
"False"
DataKeyNames
=
"InventoryId"
CommandItemDisplay
=
"TopAndBottom"
AllowPaging
=
"True"
EditMode
=
"PopUp"
>
24.
<
PagerStyle
AlwaysVisible
=
"True"
Mode
=
"NextPrevNumericAndAdvanced"
/>
25.
<
CommandItemTemplate
>
26.
<
asp:ImageButton
runat
=
"server"
id
=
"btnNew"
ImageUrl
=
"/images/icons/add.png"
tooltip
=
"Add New Inventory"
alternateText
=
"Add New Inventory"
commandName
=
"New"
cssclass
=
"right pad-5"
/>
27.
<
asp:ImageButton
runat
=
"server"
id
=
"btnPrint"
ImageUrl
=
"/images/icons/print.png"
tooltip
=
"Print"
alternateText
=
"Print"
commandName
=
"Print"
cssclass
=
"right pad-5"
/>
28.
<
asp:ImageButton
runat
=
"server"
id
=
"btnExport"
ImageUrl
=
"/images/icons/save.png"
tooltip
=
"Export to Excel"
alternateText
=
"Export to Excel"
commandName
=
"Export"
cssclass
=
"right pad-5"
/>
29.
</
CommandItemTemplate
>
30.
<
Columns
>
31.
32.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryName"
FilterControlAltText
=
"Filter Inventory Name column"
HeaderText
=
"Name"
SortExpression
=
"InventoryName"
UniqueName
=
"InventoryName"
/>
33.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
Display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"false"
DataField
=
"InventoryImage"
HeaderText
=
"Image"
AllowSorting
=
"False"
UniqueName
=
"InventoryImage"
ConvertEmptyStringToNull
=
"True"
/>
34.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryDescription"
FilterControlAltText
=
"Filter Inventory Description column"
HeaderText
=
"Description"
SortExpression
=
"InventoryDescription"
UniqueName
=
"InventoryDescription"
/>
35.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"BuildingName"
FilterControlAltText
=
"Filter Building Name column"
HeaderText
=
"Building"
SortExpression
=
"BuildingName"
UniqueName
=
"BuildingName"
/>
36.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
Display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"BuildingId"
FilterControlAltText
=
"Filter Building Id column"
HeaderText
=
"Building Id"
SortExpression
=
"BuildingId"
UniqueName
=
"BuildingId"
/>
37.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"SpaceName"
FilterControlAltText
=
"Filter Space Name column"
HeaderText
=
"Space"
SortExpression
=
"SpaceName"
UniqueName
=
"SpaceName"
/>
38.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
Display
=
"false"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"SpaceId"
FilterControlAltText
=
"Filter Space Id column"
HeaderText
=
"Space Id"
SortExpression
=
"SpaceId"
UniqueName
=
"SpaceId"
/>
39.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"InventoryTypeName"
FilterControlAltText
=
"Filter Inventory Type column"
HeaderText
=
"Type"
SortExpression
=
"InventoryTypeName"
UniqueName
=
"InventoryTypeName"
/>
40.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"CategoryName"
FilterControlAltText
=
"Filter Inventory Category column"
HeaderText
=
"Category"
SortExpression
=
"CategoryName"
UniqueName
=
"CategoryName"
/>
41.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"UnitQuantityAbbreviation"
FilterControlAltText
=
"Filter Unit Abbreviation"
HeaderText
=
"Unit"
SortExpression
=
"UnitQuantityAbbreviation"
UniqueName
=
"UnitQuantityAbbreviation"
/>
42.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"UnitPrice"
DataFormatString
=
"{0:C}"
FilterControlAltText
=
"Filter Unit Price"
HeaderText
=
"Price"
SortExpression
=
"UnitPrice"
UniqueName
=
"UnitPrice"
/>
43.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"CurrentQuantity"
FilterControlAltText
=
"Filter Current Quantity"
HeaderText
=
"Quantity"
SortExpression
=
"CurrentQuantity"
UniqueName
=
"CurrentQuantity"
/>
44.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"CurrentQuantityDescription"
FilterControlAltText
=
"Filter Current Quantity Description"
HeaderText
=
"Quantity Description"
SortExpression
=
"CurrentQuantityDescription"
UniqueName
=
"CurrentQuantityDescription"
/>
45.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"MinimumQuantity"
FilterControlAltText
=
"Filter Minimum Quantity"
HeaderText
=
"Minimum"
SortExpression
=
"MinimumQuantity"
UniqueName
=
"MinimumQuantity"
/>
46.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"PartNumber"
FilterControlAltText
=
"Filter Part Number"
HeaderText
=
"Part"
SortExpression
=
"PartNumber"
UniqueName
=
"PartNumber"
/>
47.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"ModelNumber"
FilterControlAltText
=
"Filter Model Number"
HeaderText
=
"Model"
SortExpression
=
"ModelNumber"
UniqueName
=
"ModelNumber"
/>
48.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"StockNumber"
FilterControlAltText
=
"Filter Stock Number"
HeaderText
=
"Stock"
SortExpression
=
"StockNumber"
UniqueName
=
"StockNumber"
/>
49.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"Manufacturer"
FilterControlAltText
=
"Filter Manufacturer"
HeaderText
=
"Mfr."
SortExpression
=
"Manufacturer"
UniqueName
=
"Manufacturer"
/>
50.
<
telerik:GridBoundColumn
ReadOnly
=
"True"
display
=
"False"
FilterCheckListEnableLoadOnDemand
=
"true"
DataField
=
"Url"
FilterControlAltText
=
"Filter Url"
HeaderText
=
"Url"
SortExpression
=
"Url"
UniqueName
=
"Url"
/>
51.
<
telerik:GridEditCommandColumn
UniqueName
=
"Adjust"
EnableHeaderContextMenu
=
"false"
Exportable
=
"False"
ButtonType
=
"ImageButton"
EditImageUrl
=
"/images/icons/Adjust.png"
/>
52.
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this inventory?"
ConfirmDialogType
=
"RadWindow"
EnableHeaderContextMenu
=
"False"
ConfirmTitle
=
"Delete"
Exportable
=
"False"
Reorderable
=
"False"
ButtonType
=
"ImageButton"
ImageUrl
=
"/images/icons/delete.png"
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"Delete"
/>
53.
<
telerik:GridButtonColumn
Text
=
"Edit"
CommandName
=
"Detail"
Exportable
=
"False"
Reorderable
=
"False"
EnableHeaderContextMenu
=
"False"
FilterCheckListEnableLoadOnDemand
=
"False"
ButtonType
=
"ImageButton"
ImageUrl
=
"/images/icons/edit.png"
UniqueName
=
"Detail"
/>
54.
55.
</
Columns
>
56.
<
EditFormSettings
UserControlName
=
"/Controls/AdjustInventoryQuantity.ascx"
EditFormType
=
"WebUserControl"
>
57.
<
PopUpSettings
Modal
=
"True"
ShowCaptionInEditForm
=
"True"
Width
=
"320px"
/>
58.
</
EditFormSettings
>
59.
</
MasterTableView
>
60.
<
ClientSettings
>
61.
<
ClientEvents
OnPopUpShowing
=
"PopUpShowing"
/>
62.
<
Selecting
AllowRowSelect
=
"true"
/>
63.
</
ClientSettings
>
64.
</
telerik:RadGrid
>
65.
</
telerik:RadAjaxPanel
>
Page Script:
01.
var
xPos;
02.
var
yPos;
03.
$(document).ready(
function
() {
05.
$(document).on(
'mouseenter'
,
"input[src='/images/icons/Adjust.png']"
,
function
(e) {
06.
xPos = e.pageX;
07.
yPos = e.pageY;
08.
});
09.
});
10.
11.
function
pnlRequestStarted(ajaxPanel, eventArgs) {
12.
if
(eventArgs.EventTarget.includes(
"btnExport"
) || eventArgs.EventTarget.includes(
"btnPrint"
)) {
13.
eventArgs.EnableAjax =
false
;
14.
}
else
{
15.
eventArgs.EnableAjax =
true
;
16.
}
17.
}
18.
var
popUp;
19.
function
PopUpShowing(sender, eventArgs) {
20.
var
$sender = $(sender);
21.
popUp = eventArgs.get_popUp();
22.
var
popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf(
"px"
));
23.
popUp.style.left = xPos - popUpWidth +
"px"
;
24.
popUp.style.top = yPos +
"px"
;
25.
}
26.
function
AdjustCurrentQuantity(sender, eventArgs) {
27.
28.
var
quantityAtPageLoad = parseInt($(
"#quantityAtPageLoad"
).val());
29.
var
adjustment = parseInt($(
".InventoryAdjustment"
).val());
30.
31.
if
((quantityAtPageLoad + adjustment) >= 0) {
32.
$(
".InventoryQuantity"
).val(quantityAtPageLoad + adjustment);
33.
}
else
{
34.
if
(isNaN(adjustment)) {
35.
$(
".InventoryQuantity"
).val(quantityAtPageLoad);
36.
}
else
{
37.
$(
".InventoryAdjustment"
).val(quantityAtPageLoad * -1);
38.
$(
".InventoryQuantity"
).val(0);
39.
}
40.
41.
}
42.
};
43.
function
AdjustAdjustment(sender, eventArgs) {
44.
var
quantityAtPageLoad = parseInt($(
"#quantityAtPageLoad"
).val());
45.
var
currentQuantity = parseInt($(
".InventoryQuantity"
).val());
46.
if
(currentQuantity >= 0) {
47.
$(
".InventoryAdjustment"
).val(currentQuantity - quantityAtPageLoad);
48.
}
49.
};
Hello, I'm new in telerik teleport designer and i need "Radgrid Header Context Menu Filter option for choosing columns displayed", but i don't know, where i can find it menu in telerik. can you help me? I can't find "EnableHeaderContextMenu" also:(
Please, help me(
I'm using "AllowCustomSorting" to prevent the RadGrid from sorting the values (they are already sorted) and let it just show the sort direction.
This works fine for "normal" columns.
But if such a column is grouped, the RadGrid ignores this setting and sorts by itself.
In my case it's a column with DateTime values (already formatted as strings) - they are already correctly sorted. But if I group this column, the RadGrid sorts the values itself, and especially for DateTime values as strings, this doesn't work correctly.
How can I prevent the RadGrid from sorting grouped columns and just use them as they are? I'm on the current version (2018.1) of Telerik ASP.NET Ajax.
Thanks!
Hi,
My issue and code here:
I have a telerik RadNumeric Text Box and a button. When i enter 6 digit number in the text box, it should auto tab to button.
I am using "OnKeyUp" to achieve this. The first time i type in the 6 digits into the text box, it auto tabs to the button. After that, if i go back to the text box to enter a new number, after entering a single digit, it auto tabs out. It does not wait till i enter 6 digits to tab out.
I can't figure out why it is tabbing out after entering a single digit.
NOTE: When i load the page the first time, it works good. It tabs out after entering 6 digits. Every subsequent attempt to enter a number in that text box, it tabs out after single digit.(No new page load involved). Why is it tabbing out after entering single digit
<
telerik:RadNumericTextBox
ID
=
"txtClientIDSelect"
Runat
=
"server"
AutoPostBack
=
"false"
DataType
=
"System.Int32"
ValidationGroup
=
"Submit"
OnTextChanged
=
"txtClientIDSelect_TextChanged"
MaxLength
=
"6"
Width
=
"50px"
onkeyup
=
"NumericValue1KeyDown(this,event)"
>
<
NumberFormat
ZeroPattern
=
"n"
AllowRounding
=
"False"
DecimalDigits
=
"0"
DecimalSeparator
=
"#"
GroupSeparator
=
""
GroupSizes
=
"6"
></
NumberFormat
>
</
telerik:RadNumericTextBox
>
<
asp:RequiredFieldValidator
ID
=
"reqClientID"
runat
=
"server"
ControlToValidate
=
"txtClientIDSelect"
ValidationGroup
=
"Submit"
ErrorMessage
=
"ClientID is required."
ToolTip
=
"ClientID is required."
InitialValue
=
"--Select--"
SetFocusOnError
=
"True"
>*</
asp:RequiredFieldValidator
>
<%-- <
asp:TextBox
ID
=
"txtClientIDSelect"
runat
=
"server"
></
asp:TextBox
>--%>
<
asp:Button
ID
=
"btnSubmitClient"
runat
=
"server"
Text
=
"SUBMIT"
ValidationGroup
=
"Submit"
onclick
=
"btnSubmitClient_Click"
/>
<
script
type
=
"text/javascript"
>
function NumericValue1KeyDown(sender, e) {
var key = e.keyCode;
var textCount = 0;
textCount = document.getElementById('<%= txtClientIDSelect.ClientID %>').value
//setTimeout(function() { }, 200);
if(textCount.length >= 6)
{
document.getElementById('<%=btnSubmitClient.ClientID %>').disabled = false ;
document.getElementById('<%=btnSubmitClient.ClientID %>').focus();
}
}
</
script
>
HI,
I have a user control for address on my web page. When the address or city is changed, i get a valid zip from external url and display it in the zip combobox.
All this works good but after postback, the focus is not set to the user control or to the field which caused postback.
I saved in session the control that is causing postback and tried to set focus to that control on prerender as shown below.
It still doesn't set the focus to the control. How to set the focus to these controls?
<
asp:UpdatePanel
runat
=
"server"
ID
=
"up_ClientAddr"
UpdateMode
=
"Conditional"
ChildrenAsTriggers
=
"false"
>
<
ContentTemplate
>
<
table
>
<
tr
>
<
td
>
<
span
>Address:</
span
>
<
asp:RequiredFieldValidator
ID
=
"reqAddr"
runat
=
"server"
ControlToValidate
=
"txtAddr1"
ValidationGroup
=
"Add"
ErrorMessage
=
"Address is required."
ToolTip
=
"Address is required."
SetFocusOnError
=
"True"
></
asp:RequiredFieldValidator
>
</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtAddr1"
runat
=
"server"
OnTextChanged
=
"txtAddr1_TextChanged"
AutoPostBack
=
"true"
>
</
telerik:RadTextBox
>
<
asp:Label
ID
=
"lblAddr1"
runat
=
"server"
Text
=
""
></
asp:Label
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
span
>Addr2/Apt#/Suite#: </
span
>
</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtAddr2"
runat
=
"server"
>
</
telerik:RadTextBox
>
<
asp:Label
ID
=
"lblRAddr2"
runat
=
"server"
Text
=
""
></
asp:Label
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadComboBox
ID
=
"rcbCity"
runat
=
"server"
MarkFirstMatch
=
"true"
AutoPostBack
=
"true"
OnSelectedIndexChanged
=
"rcbCity_SelectedIndexChanged"
>
</
telerik:RadComboBox
>
<
asp:Label
ID
=
"lblCity"
runat
=
"server"
Text
=
""
></
asp:Label
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
telerik:RadComboBox
ID
=
"rcbZip"
runat
=
"server"
MarkFirstMatch
=
"true"
>
</
telerik:RadComboBox
>
<
asp:Label
ID
=
"lblZip"
runat
=
"server"
Text
=
""
></
asp:Label
>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
protected
void
txtAddr1_TextChanged(
object
sender, EventArgs e)
{
Session[
"event_control"
] =
"txtAddr1"
;
GetZipCodeValidateAndUpdateZipCodeField();
}
protected
void
rcbCity_SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
Session[
"event_control"
] =
"rcbCity"
;
GetZipCodeValidateAndUpdateZipCodeField();
}
protected
void
rcbState_SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
Session[
"event_control"
] =
"rcbState"
;
GetZipCodeValidateAndUpdateZipCodeField();
}
protected
void
Page_PreRender(
object
sender, EventArgs e)
{
if
(Session[
"event_control"
] !=
null
)
{
if
(Session[
"event_control"
].ToString() ==
"txtAddr1"
)
{
txtAddr1.Focus();
}
else
if
(Session[
"event_control"
].ToString() ==
"rcbCity"
)
{
txtAddr1.Focus();
}
else
if
(Session[
"event_control"
].ToString() ==
"rcbState"
)
{
txtAddr1.Focus();
}
}
}
Thanks in Advance
Hi I'm using pasteHTML event on radeditor to paste new content on cursor position, if the editor box is empty it works just great, but if there something else and I hit enter it will modify my html making it useless
Here is my script:
function Add_Accordion() {
var Edtr = $find("<%=ContentEditor.ClientID%>");
Edtr.pasteHtml("<div id=\"accordion\"><h2>Section 1 title</h2><div><p>Text 1</p></div><h2>Section 2 title</h2><div><p>Text 2</p></div></div>");
}
So.. if I add Hello world! on the first line of editor, hit enter and then click the button to add the script above, this is the resulting html...it add tags and duplicates the ids
<div id="accordion">
</div>
<p>Hello world</p>
<div id="accordion">
<h2>Section 1 title</h2>
<div> </div>
</div>
<p>Text 1</p>
<div id="accordion">
<div> </div>
<h2>Section 2 title</h2>
<div> </div>
</div>
<p>Text 2</p>
Thanks for your help!
Hello,
I want to use a context menu for RadSplitBar's. The following code shows the set-up of my test page - it is based on the Telerik trial software R2 2018 for ASP.NET Ajax:
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
telerik:RadStyleSheetManager
id
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
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.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
script
type
=
"text/javascript"
>
//Put your JavaScript code here.
</
script
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
div
>
<
telerik:RadContextMenu
runat
=
"server"
ID
=
"ContextMenu1"
>
<
Targets
>
<
telerik:ContextMenuElementTarget
ElementID
=
"RadSplitBar1"
/>
</
Targets
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Lock"
Value
=
"L"
/>
<
telerik:RadMenuItem
Text
=
"Unlock"
Value
=
"U"
/>
</
Items
>
</
telerik:RadContextMenu
>
<
telerik:RadSplitter
ID
=
"RadSplitter1"
runat
=
"server"
>
<
telerik:RadPane
ID
=
"RadPane1"
runat
=
"server"
>
</
telerik:RadPane
>
<
telerik:RadSplitBar
ID
=
"RadSplitBar1"
runat
=
"server"
>
</
telerik:RadSplitBar
>
<
telerik:RadPane
ID
=
"RadPane2"
runat
=
"server"
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
div
>
</
form
>
</
body
>
</
html
>
The context menu is always visible if I use Windows 7 to check my test page. Windows 10 sparks problems:
Google Chrome shows the context menu (Version: 67.0.3396.99), but the context menu is not available in Internet Explorer (Version: 11.165.17134.0) and Microsoft Edge (Version: 42.17134.1.0).
Any help would be appreciated.
protected
void
rgGrid_UpdateCommand(
object
sender, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item
as
GridEditableItem;
UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
//Prepare new row to add it in the DataSource
DataRow[] changedRows =
this
.GridSource.Select(
"codigo = "
+ editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex][
"codigo"
]);
if
(changedRows.Length != 1)
{
rgGrid.Controls.Add(
new
LiteralControl(
"Unable to locate the Employee for updating."
));
e.Canceled =
true
;
return
;
}
//Update new values
Hashtable newValues =
new
Hashtable();
newValues[
"codigo"
] = (userControl.FindControl(
"txtCodigo"
)
as
TextBox).Text;
newValues[
"descricao"
] = (userControl.FindControl(
"txtDescricao"
)
as
TextBox).Text;
changedRows[0].BeginEdit();
try
{
foreach
(DictionaryEntry entry
in
newValues)
{
changedRows[0][(
string
)entry.Key] = entry.Value;
}
changedRows[0].EndEdit();
this
.GridSource.AcceptChanges();
}
catch
(Exception ex)
{
changedRows[0].CancelEdit();
Window.RadAlert(
"Erro!"
, 350, 250,
"Mensagem"
,
null
);
e.Canceled =
true
;
}
}
private
object
_dataItem =
null
;
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
public
object
DataItem
{
get
{
return
this
._dataItem;
}
set
{
this
._dataItem = value;
}
}
protected
void
btnUpdate_Click(
object
sender, EventArgs e)
{
// should i do something here or what?
}