or
function onNodeDropping(sender, args) {
var dest = args.get_destNode();
var source = args.get_sourceNode();
if (dest) {
var result = false;
for (var i = 0; i < dest.get_nodes().get_count() ; i++) {
var node = dest.get_nodes().getNode(i);
if (node.get_text() == source.get_text()) {
result = true;
break;
}
}
if (result) {
callConfirm(source.get_text());
return;
}
}
else {
dropOnHtmlElement(args);
}
}
function callConfirm(nodeText) {
radconfirm(nodeText + ' folder is existing, Do you want to overwrite?', confirmCallBackFn);
return false;
}
function confirmCallBackFn(arg) {
var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
if (arg) {
ajaxManager.ajaxRequest('ok');
}
else {
ajaxManager.ajaxRequest('cancel');
}
if (e.Argument.ToString() == "ok")
{
lbStatus.Text = "OK";
}
else if(e.Argument.ToString() == "cancel")
{
lbStatus.Text = "Cancel";
}
....
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel2"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
HorizontalAlign
=
"NotSet"
LoadingPanelID
=
"baseLoadingPanel"
OnAjaxRequest
=
"RadAjaxPanel2_AjaxRequest"
>
<
telerik:RadDataForm
ID
=
"detailsView"
runat
=
"server"
OnPreRender
=
"detailsView_PreRender"
>
<
ItemTemplate
>
<
table
class
=
"InputTable"
border
=
"1"
>
<
tr
>
<
td
>
<
telerik:RadComboBox
ID
=
"comboBoxItem"
runat
=
"server"
SelectedValue='<%# Eval("item") %>' Width="100%" ValueType="System.String">
</
telerik:RadComboBox
>
</
td
>
</
tr
>
...
protected
void
detailsView_PreRender(
object
sender, EventArgs e)
{
RadComboBox comboBox = (RadComboBox)detailsView.FindControl(
"comboBoxItem"
);
if
(comboBox!=
null
)
{
DataTable dataTable =
new
DataTable();
dataTable = SelectCommonCode(codeKind, whereclause);
comboBox.DataSource = dataTable;
comboBox.DataTextField =
"codename"
;
comboBox.DataValueField =
"code"
;
comboBox.DataBind();
}
}
<
telerik:RadAutoCompleteBox
ID
=
"acpstudents"
Runat
=
"server"
DataSourceID
=
"st"
DataTextField
=
"name"
DataValueField
=
"id"
InputType
=
"Text"
MaxResultCount
=
"10"
>
</
telerik:RadAutoCompleteBox
>
<
asp:SqlDataSource
ID
=
"st"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:dbconnection %>" EnableCaching="true" SelectCommand="SELECT [name]+' '+[lname] as name,[lname],[scode],[codemelli],[id] FROM [students] WHERE ([schoolid] = @schoolid)" SelectCommandType="Text">
<
SelectParameters
>
<
asp:CookieParameter
CookieName
=
"schoolmanager"
Name
=
"schoolid"
Type
=
"Int32"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
<
telerik:RadGrid
ID
=
"grdView"
runat
=
"server"
AutoGenerateColumns
=
"false"
EnableAJAXLoadingTemplate
=
"True"
AllowSorting
=
"true"
GroupingEnabled
=
"false"
AllowPaging
=
"true"
PageSize
=
"10"
OnNeedDataSource
=
"grdView_NeedDataSource"
OnDetailTableDataBind
=
"grdView_DetailTableDataBind"
OnItemCommand
=
"grdView_ItemCommand"
>
<
ExportSettings
ExportOnlyData
=
"true"
OpenInNewWindow
=
"true"
HideStructureColumns
=
"true"
FileName
=
"ExportExcel"
IgnorePaging
=
"true"
>
</
ExportSettings
>
<
MasterTableView
ShowHeader
=
"False"
CommandItemDisplay
=
"Top"
PageSize
=
"10"
DataKeyNames
=
"GroupName"
AllowFilteringByColumn
=
"true"
>
<
CommandItemSettings
ShowRefreshButton
=
"false"
RefreshText
=
""
ShowAddNewRecordButton
=
"true"
AddNewRecordText
=
"AddNew"
AddNewRecordImageUrl
=
"../Images/RadGrid/Duplicate.gif"
ShowExportToExcelButton
=
"true"
ExportToExcelText
=
"Export to Excel"
ExportToExcelImageUrl
=
"../Images/RadGrid/ExportToExcel.gif"
ShowExportToCsvButton
=
"true"
ExportToCsvText
=
"Collapse All"
ExportToCsvImageUrl
=
"../Images/RadGrid/CollapseAll.gif"
ShowExportToPdfButton
=
"true"
ExportToPdfText
=
"Expand All"
ExportToPdfImageUrl
=
"../Images/RadGrid/ExpandAll.gif"
/>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"GroupName"
DataField
=
"GroupName"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblGroupName"
Text='<%#Bind("GroupName") %>'>
</
asp:Label
>
<
asp:Label
runat
=
"server"
ForeColor
=
"Blue"
ID
=
"lblDisplayName"
Text='<%#Bind("DisplayName") %>'>
</
asp:Label
>
</
ItemTemplate
>
<
HeaderStyle
Wrap
=
"true"
/>
<
ItemStyle
Width
=
"100%"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
AllowSorting
=
"True"
Width
=
"100%"
runat
=
"server"
ClientDataKeyNames
=
"Id"
AllowFilteringByColumn
=
"true"
>
<
ParentTableRelation
>
<
telerik:GridRelationFields
/>
</
ParentTableRelation
>
<
Columns
>
<
telerik:GridHyperLinkColumn
DataTextField
=
"RequestNo"
Target
=
"_blank"
DataNavigateUrlFormatString
=
"~/FormController.aspx? Id={0}"
DataType
=
"System.String"
DataNavigateUrlFields
=
"Id"
HeaderText
=
"Request#"
UniqueName
=
"RequestNo"
SortExpression
=
"RequestNo"
ShowFilterIcon
=
"false"
FilterControlWidth
=
"100%"
CurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"true"
>
<
HeaderStyle
Width
=
"100px"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
CssClass
=
"hyperlink"
/>
</
telerik:GridHyperLinkColumn
>
</
Columns
>
<
PagerStyle
AlwaysVisible
=
"true"
Mode
=
"NextPrevAndNumeric"
Wrap
=
"false"
Position
=
"Bottom"
PageButtonCount
=
"5"
/>
<
ExpandCollapseColumn
ButtonType
=
"ImageButton"
UniqueName
=
"ExpandColumn"
Visible
=
"False"
>
<
HeaderStyle
Width
=
"19px"
/>
</
ExpandCollapseColumn
>
</
telerik:GridTableView
>
</
DetailTables
>
<
ExpandCollapseColumn
ButtonType
=
"ImageButton"
UniqueName
=
"ExpandColumn"
>
<
HeaderStyle
Width
=
"19px"
/>
</
ExpandCollapseColumn
>
<
NoRecordsTemplate
>
There is no document to display
</
NoRecordsTemplate
>
<
ExpandCollapseColumn
ButtonType
=
"ImageButton"
UniqueName
=
"ExpandColumn"
>
<
HeaderStyle
Width
=
"19px"
/>
</
ExpandCollapseColumn
>
</
MasterTableView
>
<
GroupingSettings
CaseSensitive
=
"false"
/>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
AlwaysVisible
=
"true"
PageButtonCount
=
"10"
/>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
ClientEvents
OnRowDblClick
=
"RowDblClick"
/>
</
ClientSettings
>
</
telerik:RadGrid
>