Genpact Cora Knowledge Center

Support

How to Find Controls on the Client Side

Use these expression parameters in a form's view expressions.

ParameterDescription
Expression Parameters
@ncontainerReference to a naming container that has an expression.
@bcontainerReference to a binding container that has an expression.
@templateReference to the template (form view) that contains an expression
@pageReference to a page.

Code Sample

The following JavaScript code snippet demonstrates how to find a grid control using client side code, that has the ID Grid1, which sits inside a form with the ID Form1

<%@ Control %>
<script>
function pageLoad()
{
    var grid = $findByControlId("controlname");
    //put your logic here....
}
 
</script>
<sq:Form runat="server" ID="Form1">
    <ContentTemplate>
 
        <sq:Grid runat="server" ID="Grid1">
        </sq:Grid>
 
    </ContentTemplate>
</sq:Form>

 
<sq:Grid runat="server" ID="Grid1"></sq:Grid>