Question

i have two radgrids in my page. i have to change the visibility of a preview button based on the grids. the visibility of the button was handled ok without ajax. but, i need to do it with ajax. i added like this

<telerik:AjaxSetting AjaxControlID="ddlFinalAggScoreType">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGdFinalAggregateScore" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radGdFinalAggregateScore">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radGdFinalAggregateScore" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radGdFinalAggregateScore">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnPreview"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radAssetNomination">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnPreview"/>
            </UpdatedControls>
        </telerik:AjaxSetting>

but it does not solve the issue. i need to hide the preview button when all rows in radAssetNomination are deleted. also need to show it when one item is added. radGdFinalAggregateScore also has similar connection with this button

one more thing i was adding ajaxsetting to radAssetNomination from code behind( as it caused a js error when i added it in aspx) as

    RadAjaxManager1.AjaxSettings.AddAjaxSetting(radAssetNomination, radAssetNomination, RadAjaxLoadingPanel1)

i also tried to add preview buttons ajaxsetting like this. but it didn't work

now the visibility work as follows. it works well(i mean hides) for the first time with the radGdFinalAggregateScore, but when i change the grid which should make the button visible, it does not work as intended. can anyone help me out of this? thanks in advance

Was it helpful?

Solution

i solved the issue by using only radajaxmanager and not using the radajaxmanager and radajaxpanel together. also, there are things which need to be considered when ajaxifying radtabstrip and multipage. Also there is a limitation of radajax to invisible controls in the page. In order to ajaxify (even if to add it as updated control in ajaxsettings) they should be placed inside an always visible asp panel and we can use that panel id in the ajax settings.

These are the links which helped me to solve the issues in my page.

Hope someone get benefits from this. :)

http://www.telerik.com/help/aspnet-ajax/ajax-tips-and-tricks.html

http://www.telerik.com/help/aspnet-ajax/ajax-limitations.html

http://www.telerik.com/help/aspnet-ajax/ajax-common-issues.html

http://www.telerik.com/help/aspnet-ajax/ajax-control-not-updated.html

OTHER TIPS

You may have better success if you wrap the regions of your page with a RadAjaxPanel instead. This way, you don't have to worry about all of the particulars; instead, any postback causes all of its children to update.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top