or
01.
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
02.
{
03.
if
(
true
&& e.Item.OwnerTableView.Name ==
"MainClient"
)
//validated
04.
{
05.
switch
(e.CommandName)
06.
{
07.
case
"Cancel"
:
08.
09.
if
(HiddenField1.Value ==
"false"
)
10.
{
11.
e.Canceled =
true
;
12.
Session[
"savedIndex"
] = e.Item.ItemIndex;
13.
RadWindowManager1.RadConfirm(
"Continue with Cancel? Warning, you will loose any unsaved work!!!"
,
14.
"confirmCancelBackFnMain"
, 350, 150,
null
,
"Cancel Confirm"
);
15.
}
16.
17.
break
;
18.
case
"CancelConfirmed"
:
19.
foreach
(GridEditableItem item
in
RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem))
20.
{
21.
if
(item.IsInEditMode && item.ItemIndex == (
int
)Session[
"savedIndex"
])
22.
{
23.
item.FireCommandEvent(
"Cancel"
, String.Empty);
24.
}
25.
}
26.
HiddenField1.Value =
"false"
;
27.
break
;
28.
}
29.
}
30.
}
31.
32.
__________
33.
34.
function confirmCancelBackFnMain(arg)
35.
{
36.
var grid = $find(
"<%= RadGrid1.ClientID %>"
);
37.
if
(arg)
38.
{
39.
//alert(document.getElementById('<%=HiddenField1.ClientID%>').value);
40.
document.getElementById(
41.
'<%=HiddenField1.ClientID
42.
%>').value =
"true"
;
43.
grid.get_masterTableView().fireCommand(
"CancelConfirmed"
, String.Empty);
44.
}
45.
else
46.
{
47.
document.getElementById(
48.
'<%=HiddenField1.ClientID
49.
%>').value =
"false"
;
50.
}
51.
52.
document.getElementById(
53.
'<%=HiddenField1.ClientID
54.
%>').value =
"false"
;
55.
}
<
Content
>
<
div
id
=
"textContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"paddingContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"classifiedArea"
contenteditable
=
"true"
unselectable
=
"off"
>
</
div
></
div
></
div
>
</
Content
>
<
div
id
=
"textContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"paddingContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"classifiedArea"
contenteditable
=
"true"
unselectable
=
"off"
style
=
"width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;"
>
Line 1<
br
>Line 2<
br
>Etc
</
div
></
div
></
div
>
<!-- End -->
<
div
id
=
"textContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"paddingContainer"
contenteditable
=
"false"
unselectable
=
"on"
>
<
div
id
=
"classifiedArea"
contenteditable
=
"true"
unselectable
=
"off"
style
=
"width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;"
>Line 1
</
div
>
<
p
id
=
"classifiedArea"
contenteditable
=
"true"
unselectable
=
"off"
style
=
"width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;"
>Line 2</
p
>
<
p
id
=
"classifiedArea"
contenteditable
=
"true"
unselectable
=
"off"
style
=
"width: 172.8px; font-family: HELVETICA; font-size: 14px; line-height: 22px; min-height: 22px;"
>Line 3</
p
>
</
div
></
div
>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string[] viewPaths = new string[] { @"C:\Test2", @"\\CHRISTIAN_KING2\Test1" };
RadFileExplorer1.Configuration.ViewPaths = viewPaths;
}
}