I am facing problem of user control not updated.
Problem Narration:
As per my and client's requirement:
I've created two user control.
One user control having a drop down.
Another user control having few no of controls and its event.
Both user control i've used in my one web page twice.
FilterDropDown and FilterDropDownGridContact is two user control.(having only a drop down)
For partial postback I've used following AjaxSettings.
Below is code of user controls how i used in first place:
Below is code of user controls how i used in second time:
Below are the events attached in code behind:
When I debug my projects, all custom events fires and get updated data in code behind and in database too.
But it display old(Not updated) data on web page or drop down.
e.g.
Problem Narration:
As per my and client's requirement:
I've created two user control.
One user control having a drop down.
Another user control having few no of controls and its event.
Both user control i've used in my one web page twice.
FilterDropDown and FilterDropDownGridContact is two user control.(having only a drop down)
For partial postback I've used following AjaxSettings.
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnSave"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"FilterDropDown"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"FilterDropDownGridContact"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
Below is code of user controls how i used in first place:
<
UserControl:FilterDropDown
ID
=
"FilterDropDown"
runat
=
"server"
GridID
=
"gridLocation"
EnableViewState
=
"true"
pageName
=
"UserProfile"
PlaceHolderID
=
"ContentPlaceHolder1"
/>
<
UserControl:Filter
ID
=
"Filter"
runat
=
"server"
GridID
=
"gridLocation"
EnableViewState
=
"true"
PlaceHolderID
=
"ContentPlaceHolder1"
/>
<
UserControl:FilterDropDown
ID
=
"FilterDropDownGridContact"
runat
=
"server"
GridID
=
"gridClientContact"
EnableViewState
=
"true"
pageName
=
"ClientContact"
PlaceHolderID
=
"ContentPlaceHolder1"
/>
<
UserControl:Filter
ID
=
"FilterGridContact"
runat
=
"server"
GridID
=
"gridClientContact"
EnableViewState
=
"true"
PlaceHolderID
=
"ContentPlaceHolder1"
/>
protected
void
Page_Load(
object
sender, EventArgs e)
{
FilterDropDown.drpFilterChange +=
new
EventHandler(drpFilter_SelectedIndexChange);
Filter.SaveFilter +=
new
EventHandler(SaveFilter); //attached with btnSave
button
Filter.ClearFilterSelection +=
new
EventHandler(ClearFilterSelection);
Filter.DeleteFilter +=
new
EventHandler(DeleteFilter);
FilterDropDownGridContact.drpFilterChange +=
new
EventHandler(FilterDropDownGridContact_SelectedIndexChange);
FilterGridContact.SaveFilter +=
new
EventHandler(SaveContactFilter);//attached with btnSave
button
FilterGridContact.ClearFilterSelection +=
new
EventHandler(ClearContactFilterSelection);
FilterGridContact.DeleteFilter +=
new
EventHandler(DeleteContactFilter);
//Other stuffs
}
But it display old(Not updated) data on web page or drop down.
e.g.
Now when I click on btnSave of first user control event fires and as per ajax setting dropdown user control updates.
But, when I click on btnSave of second user control events fires but user control is not updated.
So, Whats issue??
Is there any way, so that i can update ajax setting such as update first
user control when respective user control's btnSave fires and so on.