I have a main page that contains the radAjaxManager. Then, on a user control, I have the following defined:
Within the user control, I create a series of dynamic controls. At some times, we create repeating rows of fields where the user can add additional rows (e.g., we initially define 2 rows of three text boxes, but the user can add additional rows as they desire). We define the buttons as follows (only the minus button is shown, the plus button is defined pretty much the same):
The issue I'm having is that instead of executing the OnClientClick event, a full post-back is executed and the form is entirely reloaded (which is what we're trying to avoid since there are a half-dozen other controls that update as well and that causes a major performance hit).
What am I missing?
<
telerik:RadAjaxManagerProxy
ID
=
"rampObjectIndexInfo"
runat
=
"server"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"ralpObjectIndexInfo"
runat
=
"server"
/>
Within the user control, I create a series of dynamic controls. At some times, we create repeating rows of fields where the user can add additional rows (e.g., we initially define 2 rows of three text boxes, but the user can add additional rows as they desire). We define the buttons as follows (only the minus button is shown, the plus button is defined pretty much the same):
ImageButton minusButton =
new
ImageButton();
minusButton.ImageUrl = GetString(
"ObjectDetails.IndexingInfo.RepeatingRowRemove.ImageName"
);
minusButton.AlternateText = GetString(
"ObjectDetails.IndexingInfo.RepeatingRowRemove.AltText"
);
minusButton.OnClientClick =
"RemoveLine('"
+ dataGroupId +
"', 'btnpm_"
+ dataGroupId +
"_"
+ controlSuffix +
"',"
+ controlSuffix +
");"
;
minusButton.ID = epCustom.ID +
"_M_"
+ (controlSuffix);
minusButton.Style.Add(
"padding-right"
,
"3px"
);
//Index info is an array of dynamically created controls that will be displayed to the user
indexInfo.Controls.Add(minusButton);
rampObjectIndexInfo.AjaxSettings.AddAjaxSetting(minusButton, minusButton.Parent, ralpObjectIndexInfo);
The issue I'm having is that instead of executing the OnClientClick event, a full post-back is executed and the form is entirely reloaded (which is what we're trying to avoid since there are a half-dozen other controls that update as well and that causes a major performance hit).
What am I missing?