asp.net - Button in ItemTemplate of RadListView is losing its disabled property after PageChange -
i have radlistview control, has asp button in itemtemplate delete item . have requirement make controls in page read only. intially in page_prerender event traversing through controls , child controls , disabling them. working expected. when change page of radlistview asp controls have disabled them earlier again getting enabled. expected behaviour radlistview combining radpager. below properties have set.
<telerik:radajaxmanagerproxy id="adcleintsradajaxmanagerproxy" runat="server"> <ajaxsettings> <telerik:ajaxsetting ajaxcontrolid="clientsradajaxpanel"> <updatedcontrols> <telerik:ajaxupdatedcontrol controlid="clientsradlistview" /> </updatedcontrols> </telerik:ajaxsetting> </ajaxsettings> </telerik:radajaxmanagerproxy> <telerik:radajaxpanel id="clientsradajaxpanel" runat="server" loadingpanelid="radajaxaloadingpanel" viewstatemode="disabled"> <telerik:radlistview id="clientsradlistview" runat="server" itemplaceholderid="drugscontainer" allowpaging="true" pagesize="4" datasourceid="clientsdatasource" onitemdatabound="clientsradlistview_onitemdatabound" viewstatemode="disabled" onneeddatasource="clientsradlistview_onneeddatasource" onitemcreated="radlistview1_itemcreated" >
i have checked button enable property in different events when changed page. below sequence of page flow.
when changed radlistview page>
radlistview1_itemcreated> button.enabled property true
pageload > button.enabled property true
page_prerender > first disabling form elements function > found button enabled property false here after disabling means function working fine.
radlistview1_itemcreated> event fired again , button.enabled true here. please can 1 me this?
try using onitemdatabound event of listview set control properties in it.
page_prerender may tad late , viewstate may not updated (which may expected because disabled viewstate listview, don't know expect , after)
or, if explicitly set enabled property true in itemcreated event of listview, behavior expected, not sure doing, code not provided.
also, replace clientsradajaxpanel asp:panel. radajaxmanager/radajaxmanagerproxy must not ajax-enable radajaxpanel.
Comments
Post a Comment