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 Sudha,
I wrote an example for you which processes collapsed event and finds reference to child element on one of panes.
<script type="text/javascript">function collapseEvt(splitter, evtArgs){ var pane2 = splitter.get_panes()[1]; var label1 = pane2.findChild('Label1'); //or global search for Label1 //var label1 = $get('<%=Label1.ClientID%>'); if(label1) alert('Collapse evt. Label1=' + label1.innerHTML + ' width=' + label1.offsetWidth); else alert('Collapse evt Label1 on Pane2 was not found');}</script><ig:WebSplitter ID="WebSplitter1" runat="server" Height="80px" Width="340px"> <Panes> <ig:SplitterPane runat="server" CollapsedDirection="NextPane"> </ig:SplitterPane> <ig:SplitterPane runat="server"> <Template> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </Template> </ig:SplitterPane> </Panes> <ClientEvents Collapsed="collapseEvt" /></ig:WebSplitter>
Thank you Viktor. This works fine. Now I have an another problem; in IE-7 Splitter behaviour is working correctly, but in IE-8 when i collapse the splitter it goes to right corner of the window. The same problem is in chrome and FireFox also. Please help me.
I do not remember anybody reported similar. Maybe your application uses specific attributes for top elements like body, html, form, or splitter located in complex layout. Please, attach example of aspx (Options tab) which can be used to reproduce that behavior.
Hi Viktor,
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>
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.
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.
It supposed to work in MAC. If there are issues, then we will appreciate if they are reported.