or
how to clear RadAsyncUpload files which is hosted in Jquery UI dialog on clientside?
// clears the radasync upload
function ClearFileInput() {
var upload = $find("<%= rauMailingDocument.ClientID %>");
if (upload._uploadedFiles.length > 0) {
Array.removeAt(upload._uploadedFiles, 0);
upload.deleteFileInputAt(0);
upload.updateClientState();
}
}
Edit: Update, the above seems to work, is that the preferred method?
<
telerik:RadComboBox
ID
=
"ddlSearchRoles"
runat
=
"server"
EnableEmbeddedSkins
=
"true"
AllowCustomText
=
"false"
EnableLoadOnDemand
=
"false"
MarkFirstMatch
=
"false"
/>
<
div
class
=
"rcbSlide"
style
=
"z-index: 6000; visibility: visible; display: none; overflow: hidden; margin-left: 0pt; position: absolute; top: 323.5px; left: 806.283px; height: 107px; width: 160px;"
>
<
div
id
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles_DropDown"
class
=
"RadComboBoxDropDown RadComboBoxDropDown_Default "
style
=
"display: block; visibility: visible; top: -107px; left: 0px; width: 158px;"
>
<
div
class
=
"rcbScroll rcbWidth"
style
=
"width: 100%; overflow: auto; height: 105px;"
>
<
ul
class
=
"rcbList"
style
=
"list-style:none;margin:0;padding:0;zoom:1;"
>
<
li
class
=
"rcbHovered "
>-All-</
li
>
<
li
class
=
"rcbItem "
>Application Admin</
li
>
<
li
class
=
"rcbItem "
>Dependent Member</
li
>
<
li
class
=
"rcbItem "
>Practice Admin</
li
>
<
li
class
=
"rcbItem "
>Primary Member</
li
>
</
ul
>
</
div
>
</
div
>
</
div
>
<
div
id
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles"
class
=
"RadComboBox RadComboBox_Default"
style
=
"width:160px;"
>
<
table
class
=
""
style
=
"border-width: 0pt; border-collapse: collapse;"
summary
=
"combobox"
>
<
tbody
>
<
tr
class
=
"rcbReadOnly"
>
<
td
class
=
"rcbInputCell rcbInputCellLeft"
style
=
"width:100%;"
>
<
input
id
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles_Input"
class
=
"rcbInput"
type
=
"text"
readonly
=
"readonly"
value
=
"-All-"
name
=
"ctl00$ContentPlaceHolder1$ddlSearchRoles"
autocomplete
=
"off"
>
</
td
>
<
td
class
=
"rcbArrowCell rcbArrowCellRight"
>
<
a
id
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles_Arrow"
style
=
"overflow: hidden;display: block;position: relative;outline: none;"
>select</
a
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
<
input
id
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles_ClientState"
type
=
"hidden"
name
=
"ctl00_ContentPlaceHolder1_ddlSearchRoles_ClientState"
autocomplete
=
"off"
>
</
div
>
<
telerik:RadTabStrip
ID
=
"radTabIn"
runat
=
"server"
Skin
=
"Web20"
SelectedIndex
=
"6"
style
=
"float:none"
MultiPageID
=
"radIPPage"
Width
=
"100%"
>
<
Tabs
>
<
telerik:RadTab
Text="<span
class
=
'underline'
>R</
span
>egistration Address" Width="22%"
TabIndex="0" AccessKey="R" ToolTip="Alt+r">
</
telerik:RadTab
>
<
telerik:RadTab
Text="<span
class
=
'underline'
>P</
span
>atient Details" Width="22%" TabIndex="1" AccessKey="P" ToolTip="Alt+p">
</
telerik:RadTab
>
<
telerik:RadTab
Text="<span
class
=
'underline'
>W</
span
>ork Address" Width="21%" TabIndex="2" AccessKey="W" ToolTip="Alt+w">
</
telerik:RadTab
>
<
telerik:RadTab
Text="Past <span
class
=
'underline'
>H</
span
>istroy" Width="25%" TabIndex="3" AccessKey="H"
ToolTip="Alt+h">
</
telerik:RadTab
>
<
telerik:RadTab
Text="Aller<span
class
=
'underline'
>g</
span
>ies" Width="22%" TabIndex="4" AccessKey="G" ToolTip="Alt+g">
</
telerik:RadTab
>
<
telerik:RadTab
Text="Ha<span
class
=
'underline'
>b</
span
>its-Immunisation" Width="22%" TabIndex="5" AccessKey="B"
ToolTip="Alt+m">
</
telerik:RadTab
>
<
telerik:RadTab
Text="D<span
class
=
'underline'
>o</
span
>ctor Details" Width="21%" TabIndex="6"
AccessKey="O" ToolTip="Alt+o" Selected="True">
</
telerik:RadTab
>
<
telerik:RadTab
Text="Roo<span
class
=
'underline'
>m</
span
> Allotment" Width="25%" TabIndex="7" AccessKey="M" ToolTip="Alt+m">
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadComboBox
ID
=
"rcbPartNumber"
runat
=
"server"
TabIndex
=
"7"
Width
=
"140px"
BackColor
=
"#F9D295"
Skin
=
"Vista"
EmptyMessage
=
"All"
Font-Size
=
"XX-Small"
Height
=
"140px"
ShowMoreResultsBox
=
"true"
CausesValidation
=
"false"
AllowCustomText
=
"true"
MarkFirstMatch
=
"true"
ShowDropDownOnTextboxClick
=
"true"
OnClientFocus
=
"ClientFocus"
OnClientDropDownOpening
=
"ClientFocus"
OnClientKeyPressing
=
"onClientDDLKeyPressing"
EnableVirtualScrolling
=
"true"
EnableLoadOnDemand
=
"true"
AutoPostBack
=
"true"
AutoCompleteSeparator
=
";"
/>
function
onClientDDLKeyPressing(sender, args) {
var
keycode = args.get_domEvent().keyCode;
if
((keycode == 59) || (keycode == 186)) {
//a semicolon - it has 2 possible keycodes
var
currText = sender.get_text();
varinputBox = sender.get_inputDomElement();
setCaretPosition(sender.get_inputDomElement(), currText.length)
//if this isn't done then the typed semicolon appears at the start of the text rather than at the end
}
if
((keycode == 8) || (keycode == 127)) {
//a backspace or a delete
sender.set_text(
''
);
}
function
ClientFocus(sender, eventArgs) {
var
currText = sender.get_text();
sender.set_text(currText);
sender.selectText(0, currText.length);
switch
(sender._uniqueId.substr(sender._uniqueId.length - 13, sender._uniqueId.length - 1)) {
case
"rcbPartNumber"
:
var
hidPartNumJustGotFocus = document.getElementsByName(
'<%=hidPartNumJustGotFocus.uniqueId %>'
);
hidPartNumJustGotFocus[0].value =
"1"
;
break
;
}
}
}
function
setCaretPosition(elemId, caretPos) {
var
elem = document.getElementById(elemId);
if
(elem !=
null
) {
if
(elem.createTextRange) {
var
range = elem.createTextRange();
range.move(
'character'
, caretPos);
range.select();
}
else
{
if
(elem.selectionStart) {
elem.focus();
elem.setSelectionRange(caretPos, caretPos);
}
else
elem.focus();
}
}
}