Quantcast
Viewing all articles
Browse latest Browse all 7205

How to refer to a client-side control within a UserControl, if there is more than one UserControl instance on a page

This is an example for article How to refer to a client-side control within a UserControl. There is a UserControl with an ASPxPopupControl control. Two instances of the UserControl are put on a page. Each UserControl instance deals with its own popup control. Note the dynamically generated handler for the button's client-side Click event in WebUserControl.ascx code behind.

Question Comments

Added By: Jay Johnson at: 6/10/2015 2:30:42 PM    

Trying this with an ASPxRadioButton and getting "Databinding expressions are only supported on objects that have a DataBinding event.  DevExpress.Web.CheckEditClientSideEvents does not have a DataBinding event."

Any ideas?

Added By: Jay Johnson at: 6/10/2015 2:31:38 PM    

<dx:ASPxRadioButton ID="optNo" runat="server" Text="No" GroupName="Answer" Layout="Flow" Theme="MetropolisBlue" >
       <ClientSideEvents CheckedChanged= '<%#GetButtonClickHandler()%>' />
   </dx:ASPxRadioButton>

Added By: Larry (DevExpress Support) at: 6/10/2015 11:37:58 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T254117: The "Databinding expressions are only supported on objects that have a DataBinding event. DevExpress.Web.CheckEditClientSideEvents does not have a DataBinding event." error occurs. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Jaime Castello at: 8/18/2015 11:53:20 PM    

This works for controls where you can bind the function. However it not explain how to bind the javascript function on grid callbacks.

If you have this situation, I have no idea how to adapt openComisarioDetalle:

<script id="dxss_personaluploaderscript" type="text/javascript">
function gridComisionadosCustomButtonClick(s, e) {
gridcomisarios.GetRowValues(e.visibleIndex, "idrecord;name;surname", openComisarioDetalle);
}
function openComisarioDetalle(values) {
//some code here
}
</script>

<dx:ASPxGridView ID="gridcomisarios" runat="server" AutoGenerateColumns="False"
                   Width="100%" EnableTheming="True" ClientInstanceName="gridcomisarios" EnableViewState="False" Cursor="pointer">
                   <ClientSideEvents CustomButtonClick="function(s, e) { gridComisionadosCustomButtonClick(s, e); }" />

Added By: Paul (DevExpress Support) at: 8/19/2015 1:43:13 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T279924: How to create a javascript function in code behind. 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