Dec 01, 2008, 11:18 AM
Dynamic Creation Of Controls
*Hi Geoff/Team,
Firstly, thanks for a great framework. It's going to save me days!
I'd like to be able to create controls (Windows, Tabs) dynamically in the Codebehind (Codefile in VS2008). I'm have trouble, and I suspect this isn't support yet (maybe AjaxMethods from V0.7?).
I have a ViewPort with a button. The button has the following :
*
I then have the following in the CodeBehind :
Nothing happens (or I get an error message about this.UserProfile being null (I assume because it wasn't created beforehand.
I'm intending to use this type of functionality throughout the systems (Windows, Forms, Tabs) etc, due to the dynamic nature of the application. Can I do this type of things now with v0.6, do I have to wait for v0.7, or is it coming after that version?
Cheers
Steve
Firstly, thanks for a great framework. It's going to save me days!
I'd like to be able to create controls (Windows, Tabs) dynamically in the Codebehind (Codefile in VS2008). I'm have trouble, and I suspect this isn't support yet (maybe AjaxMethods from V0.7?).
I have a ViewPort with a button. The button has the following :
*
<ext:ScriptManager ID="ScriptManager2" runat="server">
<CustomAjaxEvents>
<ext:AjaxEvent Target="btnProfile" OnEvent="btnProfile_Click" />
</CustomAjaxEvents>
</ext:ScriptManager>
<ext:Button ID="btnProfile" runat="server" Text="Load Profile" ></ext:Button>
I then have the following in the CodeBehind :
protected void btnProfile_Click(object sender, AjaxEventArgs e)
{
Coolite.Ext.Web.Window window = new Coolite.Ext.Web.Window();
window.Title = "User Profile";
window.ID = "UserProfile";
Page.Form.Controls.Add(window);
window.Show();
}
Nothing happens (or I get an error message about this.UserProfile being null (I assume because it wasn't created beforehand.
I'm intending to use this type of functionality throughout the systems (Windows, Forms, Tabs) etc, due to the dynamic nature of the application. Can I do this type of things now with v0.6, do I have to wait for v0.7, or is it coming after that version?
Cheers
Steve