The Infragistics ASP.NET controls include a rich client-side object model, allowing you to manipulate how users interact with controls.
To complete this topic, we assume the following:
-
You have created a new ASP.NET AJAX-Enabled Web Site.
-
You have an instance of ASP.NET Ajax ScriptManager on the WebForm.
-
You have enabled Infragistics Application Styling for this application. For information on how to do this, see Enabling Application Styling Using the web.config File.
-
An instance of WebSplitter™ is on the form.
You will set up a client-side event for the WebSplitter control.
Note
|
Note:
This procedure is similar for all Infragistics ASP.NET controls built on the 'Infragistics ASP.NET AJAX Framework'. |
-
In Source view, locate the closing <HEAD> tag and place the following snippet before it.
In JavaScript:
<script type="text/javascript"><!-- -$$->$$</script>
-
Inside the script block, define a function for WebSplitter’s Expanding event. The event accepts two arguments. For more information on these arguments, see Client-Side Object Model (CSOM) CHM.
In JavaScript:
... function WebSplitter1_Expanding(sender, splitArgs){ } ...
-
Return Design view and select the WebSplitter control.
-
In the Properties window, locate the pick:[asp-net="ClientEvents"] property and expand it.
-
Next to the pick:[asp-net="Expanding"] property, type "WebSplitter1_Expanding". The event is now defined.
Note
|
Note:
At this point you will need to add code to the event in order for WebSplitter to perform a task when expanding. |