Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thanks very much for the response, but that's not what I was looking for. </p> <p>What I actually did to resolve this problem was to create a JavaScript function in the Default.aspx page that I was able to call from Page1.aspx. </p> <p>This is the function in the Default.aspx Page, which activated the Tab that I needed and populated the search box with the value I needed from the WebDataGrid from Page1.aspx.</p> <pre><code> &lt;script type="text/javascript"&gt; function activateTab(rowId, tabId) { var tab = $find("WebTab1"); var ctl; if (tabId == 3) { ctl = window.frames.document.frames[tabId].window.document.getElementById("WebDialogWindow2_tmpl_txtAddressNumber"); } else if (tabId == 2) ctl = window.frames.document.frames[tabId].window.document.getElementById("WebDialogWindow2_tmpl_txtAccount"); if (ctl != null) { ctl.value = rowId; tab.set_selectedIndex(tabId, true, null); window.frames.document.frames[tabId].window.DoSearch(rowId); } } &lt;/script&gt; </code></pre> <p>I was then able to call the activateTab() function from Page1.aspx with the following function, which is called from the DoubleClick event of the WebDataGrid (I needed to grab a value from the row that was selected.)</p> <pre><code> function doubleClickRow() { var grid = $find("WebDataGrid1"); //Get the ADDRESS_NUMBER value. var rowId = grid.get_behaviors().get_selection().get_selectedRows().getItem(0).get_cell(2).get_value(); window.parent.activateTab(rowId, 3); } </code></pre> <p>The next step was to call this JavaScript function on Page2.aspx from the activateTab() function on Default.aspx as shown in the first code example.</p> <pre><code> //Force a Postback function DoSearch(id) { HideSearch(); __doPostBack("WebDataGrid1", id); } </code></pre> <p>This actually did the post back that I needed so that's all I had to do. If I wanted to pass those 2 __doPostBack() values into the Page2.aspx Page_Load event, I would have to do the following. However in my case the Post back was all I needed as I had already populated the search box.</p> <pre><code> //Don't need these right now, but just in case we might I'll leave them in. string eventTarget = Page.Request.Params.Get("__EVENTTARGET"); string eventArgument = Page.Request.Params.Get("__EVENTARGUMENT"); Search(); </code></pre> <p>For those who don't understand the last part with the __EVENT* code, it's possible if you use a ScriptManager, otherwise you have to code your own Parameters, which I won't get into here.</p> <p>That's all there was to it. I certainly learned some JavaScript along the way here so I hope it's useful for someone else out there.</p> <p>Thanks Dave</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload