I am trying to Ajax with the Websplitter. I need to have a trigger in one panel and the target in the other but it does not seem to work. The trigger can not see the target wieh they sit on two different panes of the websplitter. It seem that Ajax does not work with the Websplitter. Am I correct to make that assumption?
One of the samples for 8.1 will be using the Microsoft UpdatePanel inside of the splitter control. This is certainly a targeted scenario, so my guess is the issue may already be resolved.
-Tony
Hello,
I've tried the 8.1 version, using the combination between WebSplitter and ajax, but it doesn't work:
using a Asynch Trigger in a SplitterPane, referring to a control of an other SplitterPane, cause an error (it doesn't find the control).
thanks
Regards
Daniele
I have tried some experimentation with a Splitter with two panes.
In the first I have an Update Panel which contains a WebImageButton, and the trigger (AsynchPostBack) is set to that buttons click event.
In the second I have a WebTextEdit control.
In the buttons click event, I have code to set the text of the WebTextEdit to 'DateTime.Now.ToLongTimeString'
The page runs with no errors, but the text in the WebTextEdit is never updated. If however, in the second pane, I put a second UpdatePanel and place the WebTextEdit inside that, then the page runs and the text of the WebTextEdit is set to the correct time.
I would be interested in the code you were using when you encountered the error.
Alex
Hello, here is is the code:
th problem (error) is caused by the trigger in the 2° panel, referring to a button in the 1° panel .
'btn_calcola' could not be found for the trigger in UpdatePanel 'up_gridview'
<cc1:WebSplitter runat="server" ID="WebSplitter1" Orientation="Horizontal" Height="760px" Width="1000px" DynamicResize="true">
<SplitterBar CssClass="Locked"></SplitterBar>
<Panes>
<cc1:SplitterPane ToolTip="Navigation Pane" Size="14%" CollapsedDirection="PreviousPane" Locked="true" BackColor="#F4F4F4">
<Template>
<table>
<tr>
<td style="width:95%">
<asp:UpdatePanel runat="server" ID="up_cerca">
<ContentTemplate>
[..]
<asp:Button ID="btn_calcola" runat="server" Text="Visualizza" BackColor="DarkGray" Font-Bold="True" Font-Names="Verdana" Font-Size="XX-Small" ForeColor="White" Width="101px" OnClick="btn_calcola_Click"/>
</ContentTemplate>
</asp:UpdatePanel>
</Template>
</cc1:SplitterPane>
<cc1:SplitterPane ToolTip="Content Pane" Size="76%" CssClass="rel" ScrollBars="Hidden" >
<asp:UpdatePanel ID="up_gridview" runat="server" UpdateMode="Conditional">
Browser="Xml" EnableAppStyling="False"
oninitializerow="UltraWebGrid1_InitializeRow" >
[...]
</igtbl:UltraWebGrid>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btn_calcola" EventName="Click" />
</Triggers>
</cc1:WebSplitter>
Thanks!
The problem is that the button is inside of a template, and is not a top level element. Any time a control is placed into a template you lose the ability to reference the control via a simple ID, and you have to use the UniqueID instead. The UniqueID includes the ids of all naming containers which may be wrapped around the control. Suppose you had a button with id "but1". Once it's placed inside of a splitter it's unique id becomes
[Splitter.ID]:[template.ID]:but1
If your button is in the first pane of a splitter named "splitter", this will become "splitter:tmpl0:but1" If you set the ControlID of the trigger to that value, the Update panel will be able to correctly identify the control, and everything should work. Even though I hate hard coding ID's, when I tried doing this at runtime via the page_load event, the updatepanel yelled at me. So until I figure out a 'cleaner' solution, this will have to do.
-tony
Simply try moving the Trigger from the second panel to the first.
Let me know if this works.
I do not know why your code does not work, but in my experiments, there appears to be a problem with update panels inside the splitter.
Trying to use triggers from controls outside an UpdatePanel that is inside a Splitter produces errors.
Perhaps someone from Infragistics could comment ?