I am stuck on a project for a while. please give me some suggestion.
The requirement is that there is a radlistbox which contains buttons in a radwindow AAA. Once I click any button inside the radlistbox, a new radwindow BXX will show up in a designed position according to which button has been clicked.If the button has not been clicked before,a new radwindow BXX will be opened. That means if I clicked two different buttons, two new radwindow BXX will be opened in the window. If the button has been clicked, there is no need to open new radwindow.
Also, the radwinow AAA which contains the radlistbox could be repositioned in the window. If it is repositioned, when I click any button inside the radlistbox, a position of new radwindow BXX according to the reposition.
My question 1 is. how to open multiple new radwindows BXX in desgined position? I use the code below and only get a radwindow BXX instead of multiple radwindow BXX.
function ShowWindow(assetId){
var pos = GetTopLeftWidthPosition(assetId);
var oMan = GetWindowManager();
var oWnd = oMan.getWindowById("WIDGETcf0376226a6944999bc3269b48fbc4ac");
oWnd.setUrl(
"<%=GetWidgetURL(Settings.PAGE_ASSETMARKETVIEW)%>" + "?aid=" + assetId, "WID_AMV_ONE"+assetId.toString());
oWnd.moveTo(pos.left,pos.top);
oWnd.show();
oWnd.setActive();
}
My question 2 is. When I reposition the radwindow AAA using the code below, it only work after second reposition.
var oMan= GetWindowManager();
var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");
oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");
oWnd.add_dragEnd(OnClientDragEnd);
oWnd.show();
var oMan= GetWindowManager();
var oWnd=oMan.getWindowByName("WIDGET74ce09f36ebe4fffa45389e9303526f2");
oWnd.setUrl("<%=GetWidgetURL(Settings.PAGE_ASSETSELECTOR)%>","WID_AMV_ONE");
function OnClientDragEnd(sender, eventArgs)
{
window.setTimeout(
function () {
bounds = sender.getWindowBounds();
}, 20);
}