PDA

View Full Version : Add ext:Button in AjaxEvent



Jurke
Sep 12, 2008, 9:26 AM
Hi
Im trying to add a button in the code behind during a AjaxEvet, but it does not reflect on the web page. Any ideas?








<ext:Panel ID="Panel1" runat="server" Collapsible="True" BodyBorder="False" Border="False" Header="False" Collapsed="false">
<Content><div class="TravelPort">No hotels found
</Content>
</ext:Panel>




<ext:Button ID="Button2" runat="server" Text="Submit">
<AjaxEvents><Click OnEvent="Button1_Click"></Click></AjaxEvents>
</ext:Button>


protected void Button1_Click(object sender, AjaxEventArgs e){
Coolite.Ext.Web.Button btnTest = new Coolite.Ext.Web.Button();
btnTest.ID = "btnTest";
btnTest.Text = "Test";
Panel1.Controls.Add(btnTest);
}


Best regards
Mikael Jürke

Vladimir
Sep 12, 2008, 9:35 AM
Hi Mikael,

Unfortunately the dynamic controls during AjaxEvent don't support yet

Jurke
Sep 12, 2008, 9:41 AM
Okay I see.
Do you know approximatly when it will be possible?

Timothy
Sep 12, 2008, 9:49 AM
You could always have the controls hidden on your form and use SetVisibility on AjaxEvent.

Cheers,
Timothy

stkmks
Oct 09, 2008, 8:06 PM
Hello,

Is there any chance you could post a quick example of 'Setvisibility on AjaxEvent'?


Just in case, in 0.6.0 i havent had any luck with extcontrol.SetVisible(bool), it doesnt seem to do anything to hidden controls though an ajaxevent or postback, but extcontrol.visible = true works though postback (and not though ajaxevent as expected).


If there is another way via an AjaxEvent object, would be good to know how to get one for click hander say.


Thanks for your help,


marcus

aespinoza
Jan 16, 2009, 7:54 PM
 Do you know in what released is this feature going to be supported ?

Thanks,
Alex.