I have been trying to fix this for nearly a week now, and I am completely at a loss as to why this is not working. I am at my wits end and I need help.
I am creating a "Composite Control". Inside the CreateChildControls() method I have the following code...
The CreateControlDesign() method has the following code...
In the CompositeControl's Page_Load() event, I have the following code...
When I use the control, everything renders fine on the initial load. When I update the value of any of the internal controls, I see the RADAJAXLoadingPanel appear for a second with the spinning circle as I expect to see. Then the loading panel vanishes and none of the internal control values update based on the code I have. I stepped through the code and the CheckBoxList is getting new values, and so is the label...but the changes are not being displayed.
Any ideas? Please help! This has been driving me nuts and is causing a significant delay in my development schedule.
-Ben
I am creating a "Composite Control". Inside the CreateChildControls() method I have the following code...
'***************************************
' Clear The Controls Collection
'***************************************
Me
.Controls.Clear()
'***************************************
' Create Container Panel(s)
'***************************************
Me
._panelContainer =
New
Panel
With
Me
._panelContainer
.ID =
"panelMainContainer"
End
With
'***************************************
' Create Message PlaceHolder
'***************************************
Me
._phPlaceHolder =
New
PlaceHolder
With
Me
._phPlaceHolder
.ID =
"phPlaceHolder"
End
With
'***************************************
' Add Controls Directly To Container
'***************************************
With
Me
._panelContainer.Controls
'***************************************
' Add Message Placeholder
'***************************************
.Add(
Me
._phPlaceHolder)
'***************************************
' Create AJAX Controls
'***************************************
If
(
Me
.UseAjax)
Then
'***************************************
' Define RADAJAXLoadingPanel
'***************************************
Me
._panelRADAjaxLoading =
New
RadAjaxLoadingPanel
With
Me
._panelRADAjaxLoading
.ID =
"panelRADAjaxLoading"
.Skin =
"Default"
.EnableSkinTransparency =
True
.BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center
End
With
'***************************************
' Add Loading Panel
'***************************************
.Add(
Me
._panelRADAjaxLoading)
End
If
'***************************************
' Add Control Design To Panel
'***************************************
.Add(
Me
.CreateControlDesign())
End
With
'***************************************
' Add Main Panel Container To Base Control
'***************************************
Me
.Controls.Add(
Me
._panelContainer)
'***************************************
' Call Base Class Method
'***************************************
MyBase
.CreateChildControls()
The CreateControlDesign() method has the following code...
Private
Function
CreateControlDesign()
As
Control
'***************************************
' Initialize Variables
'***************************************
Dim
objTable_Main
As
CodeLibrary.HTMLTableBuilder
'***************************************
' Default Values
'***************************************
Me
._cboRoleGroups =
New
DropDownList
Me
._chkRoles =
New
CheckBoxList
Me
._cmdClearSelection =
New
LinkButton
Me
._lblTotalSelectedRoles =
New
Label
'***************************************
' Initialize Controls
'***************************************
With
Me
._cboRoleGroups
.ID =
"cboRoleGroups"
.AutoPostBack =
True
End
With
With
Me
._chkRoles
.ID =
"chkRoles"
.AutoPostBack =
True
End
With
With
Me
._cmdClearSelection
.ID =
"cmdClearSelectedRoles"
.Text =
"Clear Selected Roles"
End
With
With
Me
._lblTotalSelectedRoles
.ID =
"lblTotalSelectedRoles"
.Text =
"{0} Roles Selected"
End
With
'***************************************
' Main Container Table
'***************************************
objTable_Main =
New
CodeLibrary.HTMLTableBuilder
With
objTable_Main
'***************************************
' Set Table Properties
'***************************************
.Table.ID =
"tblMain"
If
(
Me
.UseDNNFormItemClass)
Then
.Table.CssClass =
"dnnFormItems"
'***************************************
' Row: 01 (Role Group Selector)
'***************************************
.NewRow()
With
.CurrentRow
'***************************************
' Cell 01: cboRoleGroups
'***************************************
objTable_Main.NewCell()
With
objTable_Main.CurrentCell
'***************************************
' Set Cell Properties
'***************************************
If
(
Me
.UseDNNFormItemClass)
Then
.CssClass =
"dnnFormItem"
.Width =
New
Unit(0, UnitType.Pixel)
'***************************************
' Add Control(s) To Cell
'***************************************
.Controls.Add(
Me
._cboRoleGroups)
End
With
objTable_Main.CommitCell()
'***************************************
' Cell 02: Spacer
'***************************************
objTable_Main.NewCell()
With
objTable_Main.CurrentCell
.Width =
New
Unit(10, UnitType.Pixel)
End
With
objTable_Main.CommitCell()
'***************************************
' Cell 03: lblTotalSelectedRoles
'***************************************
objTable_Main.NewCell()
With
objTable_Main.CurrentCell
'***************************************
' Set Cell Properties
'***************************************
.Width =
New
Unit(100, UnitType.Percentage)
'***************************************
' Add Control(s) To Cell
'***************************************
.Controls.Add(
Me
._lblTotalSelectedRoles)
End
With
objTable_Main.CommitCell()
End
With
.CommitRow()
'***************************************
' Row: 02 (Clear Selection Button)
'***************************************
.NewRow()
With
.CurrentRow
'***************************************
' Cell 01: Data Entry Control
'***************************************
objTable_Main.NewCell()
With
objTable_Main.CurrentCell
'***************************************
' Set Cell Properties
'***************************************
If
(
Me
.UseDNNFormItemClass)
Then
.CssClass =
"dnnFormItem"
.ColumnSpan = 3
'***************************************
' Add Control(s) To Cell
'***************************************
.Controls.Add(
Me
._cmdClearSelection)
End
With
objTable_Main.CommitCell()
End
With
.CommitRow()
'***************************************
' Row: 03 (Role Selector)
'***************************************
.NewRow()
With
.CurrentRow
'***************************************
' Cell 01: Data Entry Control
'***************************************
objTable_Main.NewCell()
With
objTable_Main.CurrentCell
'***************************************
' Set Cell Properties
'***************************************
If
(
Me
.UseDNNFormItemClass)
Then
.CssClass =
"dnnFormItem DCCRemoveLabelContraints"
.ColumnSpan = 3
'***************************************
' Add Control(s) To Cell
'***************************************
.Controls.Add(
Me
._chkRoles)
End
With
objTable_Main.CommitCell()
End
With
.CommitRow()
End
With
'***************************************
' Return Final Value
'***************************************
Return
objTable_Main.Table
End
Function
In the CompositeControl's Page_Load() event, I have the following code...
'***************************************
' Register Controls w/ RADAJAXManager
'***************************************
If
(
Me
.UseAjax)
Then
Dim
objRADAjaxManager
As
RadAjaxManager =
Me
.RADAjaxManager
If
((objRADAjaxManager IsNot
Nothing
)
AndAlso
(
Me
.Visible))
Then
With
objRADAjaxManager.AjaxSettings
'***************************************
' Set AJAX Update Triggers
'***************************************
.AddAjaxSetting(
Me
._cboRoleGroups,
Me
._panelContainer,
Me
._panelRADAjaxLoading)
.AddAjaxSetting(
Me
._cmdClearSelection,
Me
._panelContainer,
Me
._panelRADAjaxLoading)
.AddAjaxSetting(
Me
._chkRoles,
Me
._panelContainer,
Me
._panelRADAjaxLoading)
.AddAjaxSetting(
Me
._chkRoles,
Me
._chkRoles)
.AddAjaxSetting(
Me
._chkRoles,
Me
._lblTotalSelectedRoles)
End
With
End
If
End
If
When I use the control, everything renders fine on the initial load. When I update the value of any of the internal controls, I see the RADAJAXLoadingPanel appear for a second with the spinning circle as I expect to see. Then the loading panel vanishes and none of the internal control values update based on the code I have. I stepped through the code and the CheckBoxList is getting new values, and so is the label...but the changes are not being displayed.
Any ideas? Please help! This has been driving me nuts and is causing a significant delay in my development schedule.
-Ben