Quantcast
Viewing all articles
Browse latest Browse all 7205

ASPxSplitter - How to manipulate client-side objects inside a pane with the specified ContentUrl property

This example demonstrates how to manipulate the client-side programmatic objects inside ASPxSplitter's pane with a specified ContentUrl property.

- Get the content IFrame from ASPxSplitter's pane with a specified ContentUrl property viathe ASPxClientSplitterPane.GetContentUrlmethod;
- Get the underlying content window object of this IFrame via the contentWindowproperty;
- Get the required object from this window and manipulate it.

How to set ASPxTextBox.Text inside a pane with a specified ContentUrl property.

ContentPageWithTextbox.aspx:

[ASPx]
<dx:ASPxTextBoxID="tbContent"runat="server"Width="170px"ClientInstanceName="clientTbContent"></dx:ASPxTextBox>


Default.aspx:

[ASPx]
<dx:ASPxSplitterID="splt"runat="server"ClientInstanceName="splitter"><Panes><dx:SplitterPane><ContentCollection><dx:SplitterContentControlID="SplitterContentControl1"runat="server"><dx:ASPxComboBoxID="cmb"runat="server"ClientInstanceName="clientComboBox"><Items> ... </Items><ClientSideEventsSelectedIndexChanged="OnSelectedIndexChanged"/></dx:ASPxComboBox></dx:SplitterContentControl></ContentCollection></dx:SplitterPane><dx:SplitterPaneContentUrl="~/ContentPageWithTextbox.aspx"Name="pnExternalPage"></dx:SplitterPane></Panes></dx:ASPxSplitter>

[JScript]
function OnSelectedIndexChanged(s, e){var contentIFrame = splitter.GetPaneByName("pnExternalPage").GetContentIFrame();var contentIFrameWindow = contentIFrame.contentWindow;var contentTextBox = contentIFrameWindow.clientTbContent;if(contentTextBox) contentTextBox.SetText(s.GetText());}

See Also:
E3614: ASPxSplitter - How to return a value from a page specified via SplitterPane.ContentUrl

Question Comments

Added By: Manuel Paz P at: 6/5/2015 6:36:49 AM    

How to find a control inside contentIFrameWindow?
clientTbContent it's a dinamic control and generates runtime. I have the ID of the control:
"RFCX1"
Obviously this is incorrect: contentIFrameWindow."RFCX1". Does exist a method of contentIFrameWindow to get the control from ID?
I already try getElementById but still not working.

Added By: Larry (DevExpress Support) at: 6/5/2015 8:29:29 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T251888: ASPxSplitter - How to find a control inside contentIFrameWindow. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>