Hi,
i try to Update a simple Label on Close Event of dynamic created RadDock.
Works fine so far, Label gets the correct values but doesnt updates it.
I tried to do this:
while creating the docks, but on runtime i get a NullReference Excepetion.
On a Button registered with the RadAjaxManager it works to show the value
assigned by dock_command.
i try to Update a simple Label on Close Event of dynamic created RadDock.
Works fine so far, Label gets the correct values but doesnt updates it.
RadDock dock = new RadDock(); |
dock.DockMode = DockMode.Docked; |
dock.UniqueName = Guid.NewGuid().ToString(); |
dock.ID = string.Format("RadDock{0}", dock.UniqueName); |
dock.Title = slide.slideName; |
dock.Text = string.Format("Added at {0}", DateTime.Now); |
dock.Width = Unit.Pixel(300); |
dock.AutoPostBack = true; |
dock.CommandsAutoPostBack = true; |
dock.Command += new DockCommandEventHandler(dock_Command); |
... |
void dock_Command(object sender, DockCommandEventArgs e) |
{ |
Status.Text = "Removed " + ((RadDock)sender).Title + " " + ((RadDock)sender).Text; |
} |
I tried to do this:
RadAjaxManager1.AjaxSettings.AddAjaxSetting(dock, Status, null); |
while creating the docks, but on runtime i get a NullReference Excepetion.
On a Button registered with the RadAjaxManager it works to show the value
assigned by dock_command.
protected void Button1_Click(object sender, EventArgs e) |
{ |
Status.Text = Status.Text; |
} |
RadDock dock = new RadDock(); |
dock.DockMode = DockMode.Docked; |
dock.UniqueName = Guid.NewGuid().ToString(); |
dock.ID = string.Format("RadDock{0}", dock.UniqueName); |
dock.Title = slide.slideName; |
dock.Text = string.Format("Added at {0}", DateTime.Now); |
dock.Width = Unit.Pixel(300); |
dock.AutoPostBack = true; |
dock.CommandsAutoPostBack = true; |
dock.Command += new DockCommandEventHandler(dock_Command); |
... |
void dock_Command(object sender, DockCommandEventArgs e) |
{ |
Status.Text = "Removed " + ((RadDock)sender).Title + " " + ((RadDock)sender).Text; |
} |