<
asp:Button
ID
=
"btnUpdate"
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</
asp:Button
>
<
asp:Button
ID
=
"btnCancel"
Text
=
"Cancel"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
></
asp:Button
>
The outerHTML of the object "_15" is as follows:
"<DIV style="Z-INDEX: 10000; POSITION: absolute; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50); BACKGROUND-COLOR: #aaaaaa; WIDTH: 1653px; DISPLAY: none; HEIGHT: 915px; TOP: 0px; LEFT: 0px; opacity: .5; mozOpacity: .5" class=TelerikModalOverlay unselectable="on"></DIV>"
As a side note, if you open the modal popup window, and close it and then click Cancel (without firing the validation event) everything works fine. However, it also fails (same error) if you leave a field empty, click Save causing a validation error, then fill in the all of the fields and click Save again (validation passes), but you get the same error.
Oh, and using DestroyOnClose is not an option as they may need to open the popup a second time. This fixes the problem stated above but does not allow the use to open the popup after they close it.
Any ideas on the problem here? Is it a bug in Telerik or am I doing something wrong?
Thanks,
Bob
var
ajaxManager = $find(
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
);
ajaxManager.ajaxRequestWithTarget(
'<%= ReportPageMenu.FindItemByValue("MyItemValue").UniqueID %>'
,
''
);
<
telerik:RadMenu
runat
=
"server"
ID
=
"ReportPageMenu"
OnItemClick
=
"ReportMenuHandler"
/>
<body onkeydown=
"setShift(event)"
onkeyup=
"setShift(event)"
>
<telerik:RadCodeBlock runat=
"server"
ID=
"RadCodeBlock1"
>
<script type=
"text/javascript"
>
//I normally put this code right in the form (first item)
var
shiftKey=
false
;
var
treeView;
function
pageLoad()
{
treeView = $find (
"<%= treeYourTree.ClientID %>"
);
}
//capture the shift key for copying
function
setShift(e)
{
if
(window.event)
{
shiftKey = window.event.shiftKey;
}
else
{
if
(e.shiftKey)
{
shiftKey=
true
;
}
else
{
shiftKey=
false
;
}
}
}
function
onNodeClicked(sender, eventArgs)
{
if
(shiftKey)
{
treeView.trackChanges();
//We should have selected nodes if we are shift clicking
if
(treeView.get_selectedNodes!=
null
)
{
//Capture the first selected node and the current selected node
var
firstSelected = treeView.get_selectedNodes()[0];
var
currentSelected = eventArgs.get_node();
//Unselect all the nodes and initialize the continue / iteration boolean
treeView.unselectAllNodes;
var
cont=
false
;
//Iterate through the parent's children (iterate through the same level as selected)
for
(
var
i=0; i< firstSelected.get_parent().get_nodes().get_count(); i++)
{
currItNode = firstSelected.get_parent().get_nodes().getNode(i);
cont = (cont)? !(currItNode == firstSelected || currItNode == currentSelected)
:(currItNode == firstSelected || currItNode == currentSelected);
if
(cont && firstSelected.get_parent().get_nodes().getNode(i))
firstSelected.get_parent().get_nodes().getNode(i).select();
}
}
treeView.commitChanges();
}
}
</script>
</telerik:RadCodeBlock>
<-- tree goes somewhere
in
here
with
OnClientNodeClicked=
"onNodeClicked"
-->
</body>