or
public
class
RadFilterDropDownEditor : RadFilterDataFieldEditor
{
protected
override
void
CopySettings(RadFilterDataFieldEditor baseEditor)
{
base
.CopySettings(baseEditor);
var editor = baseEditor
as
RadFilterDropDownEditor;
if
(editor !=
null
)
{
DataSourceID = editor.DataSourceID;
DataTextField = editor.DataTextField;
DataValueField = editor.DataValueField;
}
}
public
override
System.Collections.ArrayList ExtractValues()
{
ArrayList list =
new
ArrayList();
list.Add(_combo.SelectedValue);
return
list;
}
public
override
void
InitializeEditor(System.Web.UI.Control container)
{
_combo =
new
RadComboBox();
_combo.DataTextField = DataTextField;
_combo.DataValueField = DataValueField;
_combo.DataSourceID = DataSourceID;
container.Controls.Add(_combo);
}
public
override
void
SetEditorValues(System.Collections.ArrayList values)
{
if
(values !=
null
&& values.Count > 0)
{
if
(values[0] ==
null
)
return
;
var item = _combo.FindItemByValue(values[0].ToString());
if
(item !=
null
)
item.Selected =
true
;
}
}
public
string
DataTextField
{
get
{
return
(
string
)ViewState[
"DataTextField"
] ??
string
.Empty;
}
set
{
ViewState[
"DataTextField"
] = value;
}
}
public
string
DataValueField
{
get
{
return
(
string
)ViewState[
"DataValueField"
] ??
string
.Empty;
}
set
{
ViewState[
"DataValueField"
] = value;
}
}
public
string
DataSourceID
{
get
{
return
(
string
)ViewState[
"DataSourceID"
] ??
string
.Empty;
}
set
{
ViewState[
"DataSourceID"
] = value;
}
}
private
RadComboBox _combo;
}
<
telerik:RadNumericTextBox
ID
=
"overAmountTextBox"
Runat
=
"server"
MaxLength
=
"13"
MaxValue
=
"999999.999999"
MinValue
=
"-999999.999999"
Text='<%# Bind("overAmount") %>'
TabIndex="7">
<
ClientEvents
OnLoad
=
"onLoadAmount"
/>
<
FocusedStyle
HorizontalAlign
=
"Right"
/>
<
EnabledStyle
HorizontalAlign
=
"Right"
/>
<
NumberFormat
DecimalDigits
=
"4"
/>
</
telerik:RadNumericTextBox
>
<
script
type
=
"text/javascript"
>
//
<![CDATA[
//
function onLoadAmount(sender, args) {
alert('Amount');
}
//]]>
</
script
>
Hi,
Is there a way to detect a double-click on the title icon on the left side? Our users are expecting to close the window by double clicking on it as they would do in a Windows application.
Thanks.
/// <summary>
/// Parses custom/default commands of RadDock.
/// </summary>
public
void
RadDock_Command(
object
sender, DockCommandEventArgs e)
{
Logger.InfoFormat(
"Command {0} detected for {1} "
, e.Command.Name, ID);
switch
(e.Command.Name)
{
case
"Close"
:
Close();
break
;
case
"Refresh"
:
RefreshContent(ForceCacheRefresh.True);
break
;
case
"Toggle Legend"
:
ToggleLegend();
break
;
case
"Undo Drill Down"
:
UndoDrillDown();
break
;
default
:
Logger.ErrorFormat(
"Unhandled command name: {0}"
, e.Command.Name);
break
;
}
}
public
void
RaisePostBackEvent(
string
eventArgument)
{
HandleDialogClose(eventArgument);
}
private
void
HandleDialogClose(
string
json)
{
if
(json.Contains(
"HistoricalLocalSettingsJSON"
))
{
UpdateSettings(JsonConvert.DeserializeObject<HistoricalLocalSettingsJSON>(json));
}
else
if
(json.Contains(
"CustomLocalSettingsJSON"
))
{
UpdateSettings(JsonConvert.DeserializeObject<CustomLocalSettingsJSON>(json));
}
else
{
Logger.ErrorFormat(
"Unable to handle JSON: {0}"
, json);
}
}