or
01.
drop:
function
(e) {
02.
var
_tree =
this
,
03.
_src = _tree.dataItem(e.sourceNode),
04.
_dest = _tree.dataItem(e.destinationNode),
05.
_pos = e.dropPosition;
06.
07.
if
(_pos ==
"over"
) {
08.
if
(_dest.hasChildren) {
09.
if
(!_dest.loaded()) {
10.
var
_result = _dest.children.fetch();
11.
12.
}
13.
}
14.
}
15.
}
01.
transport: {
02.
read:
function
(options) {
03.
$.ajax({
04.
url:
'@Url.Action("Read", "TreeView")'
,
05.
type:
'GET'
,
06.
dataType:
'json'
,
07.
data: options.data
08.
}).success(
function
(result) {
09.
return
options.success(result);
10.
}).error(
function
(result) {
11.
return
options.error(result);
12.
});
13.
}
14.
}
[Display(Name =
"Birth Date"
)]
[Required()]
public
DateTime? BirthDate {
get
;
set
; }
<
div
class
=
"tableRow"
>
<
span
class
=
"tableCellLabelIndent"
>
@Html.LabelFor(m => m.BirthDate)
</
span
>
<
span
class
=
"tableCellInputWide"
>
@Html.EditorFor(m => m.BirthDate, "Date")
@Html.ValidationMessageFor(m => m.BirthDate)
</
span
>
</
div
>