Hi,
i am using infragistics9.1. The WebSplitter control Collapsed and Expanded events not firing. How to do this? I want to expand the span controls on the Splitter Collapsed event. Please give the sample code.
Thanks in advance.
Regards,
Sudha
HI,
If you are talking about Server Side Events -
Wire up the Collapse and Expanded events - then set the AutoPostBack properties Collapse and Expanded equal to ON.
Here is a help link to the AutoPostBack properties:
https://es.infragistics.com/help/aspnet/infragistics.web~infragistics.web.ui.editorcontrols.webrating~autopostbackflags
For Client-Side Collapse and Expanded events - just wire up the Client-Side Events.
Here is my sample Aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="Infragistics2.Web.v9.1, Version=9.1.20091.2015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.LayoutControls" tagprefix="ig" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">www.w3.org/.../xhtml11.dtd"> <html xmlns="">www.w3.org/.../xhtml"> <head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> function Collapsed(sender, splitargs){ debugger; } function Expanded(sender, splitargs) { debugger; } </script>
</head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <ig:WebSplitter ID="WebSplitter1" runat="server" Height="200px" oncollapsed="WebSplitter1_Collapsed" onexpanded="WebSplitter1_Expanded" Width="300px"> <AutoPostBackFlags Collapsed="On" Expanded="On" /> <panes> <ig:SplitterPane runat="server" CollapsedDirection="NextPane"> </ig:SplitterPane> <ig:SplitterPane runat="server" CollapsedDirection="NextPane"> </ig:SplitterPane> </panes> <ClientEvents Collapsed="Collapsed" Expanded="Exanded" /> </ig:WebSplitter> </div> </form></body></html>
Here is my code-behind:
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
} protected void WebSplitter1_Collapsed(object sender, Infragistics.Web.UI.LayoutControls.SplitterPaneCollapsedEventArgs e) {
} protected void WebSplitter1_Expanded(object sender, Infragistics.Web.UI.LayoutControls.SplitterPaneExpandedEventArgs e) {
}}
Hi Sudha,
It supposed to work in MAC. If there are issues, then we will appreciate if they are reported.
Hi Viktor,
Thanks for your reply. You are correct, we remove the align="center" attribute in <td> then the splitter behaviour is same. Thanks again.
Is infragistics support MAC? please let me know.
I copied your codes to one of aspx in my sample and it worked fine. There were wrong javascript codes in collapsedEvent which raised exception, but that exception did not affect layout. The iged_getById is designed for WebTextEdit, but not for asp:TextBox.
Please, test splitter in a separate aspx, rather than inside of content of master page and check how it works. Also remove all custom scripts which may raise exceptions or affect behavior. If it works ok, then you can go thurther, move splitter into master page and test again. If it has problems with layout, then try to figure out what causes them (maybe there are some css classes or layout related attributes like position:relative/absolute, text-alignment:left/center, etc).
After that you may restore one by one and test other features including custom javascripts.
Below is my sample(.aspx) page. Please go thru this and let me know. Thanks a lot.
<%@ Page Language="C#" MasterPageFile="~/MasterLeftTop.master" AutoEventWireup="true" CodeFile="SampleSplitter.aspx.cs" Inherits="SampleSplitter" Title="Untitled Page" %>
<%@ Register Assembly="Infragistics2.Web.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.LayoutControls" TagPrefix="ig" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><script language="javascript" type="text/javascript"> function collapsedEvent(splitter, evtArgs){var objhtml = iged_getById("<%=TextBox2.ClientID%>"); objhtml.Height = 300; }</script>
<asp:ScriptManager runat="server"> </asp:ScriptManager> <%--<asp:ScriptManager ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> </asp:ScriptManager>--%><div id="splitterDIV" style="width:100%; height:200px;"> <ig:WebSplitter ID="WebSplitter1" runat="server" Height="200px" Width="610px" Orientation="Horizontal"> <Panes> <ig:SplitterPane Size="50%" style="padding: 5px;" CollapsedDirection="NextPane" runat="server"> <Template> <asp:TextBox ID="TextBox1" TextMode="MultiLine" Height="50px" runat="server"></asp:TextBox> </Template> </ig:SplitterPane> <ig:SplitterPane Size="50%" style="padding: 5px;" runat="server"> <Template> <asp:TextBox ID="TextBox2" TextMode="MultiLine" Height="50px" Width="300px" runat="server"></asp:TextBox> </Template> </ig:SplitterPane> </Panes> <ClientEvents Collapsed="collapsedEvent" /> <SplitterBar CssClass="SplitterBar" HoverCssClass="SplitterBarHover" ThicknessCssClass="SplitterBarThickness"> </SplitterBar> </ig:WebSplitter></div>
</asp:Content>