RadAjaxManager seems preventing RadToolbarButton.Enabled = true

6 posts, 0 answers
  1. JR
    JR avatar
    11 posts
    Member since:
    Jul 2012

    Posted 10 Apr 2012 Link to this post

    In my form I have a RadAjaxmanager to handle post backs for a Radgrid itemcommand.  The same item command should enable a RadToolbarButton.   However this doesn't work.  I removed the RadAjaxManager and the same code now works.

    Please help!
  2. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 13 Apr 2012 Link to this post

    Hello JR,

    Can you elaborate some more on the issue providing us more information about the exact error you get.
    For your convenience I have attached a RadGrid page sample where I implemented a scenario resembling yours.

    Please give it a look and see where our projects differ because on my side it works properly.

    All the best,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. JR
    JR avatar
    11 posts
    Member since:
    Jul 2012

    Posted 16 Apr 2012 Link to this post

    Hi Eyup,

    There's no error encountered.  My only issue is that in my code behind whenever I try to set the Enable property of a RadToolBarButton to true it doesn't update the state of the button (remains disabled) if I use a RadAjaxmanager to handle the post back for the form.  

    My scenario is my aspx page contains RadTextBox1, RadGrid1 (which contains 2 columns called MyItem1 and  EditColumn), RadAjaxManager1, RadLoadingPanel1 and RadToolBar1 (which have 2 buttons, Button1 and Button2, both Enabled = false).

    0. RadAjaxManager1 will handle the click event from RadGrid (postback) and load the loading panel RadLoadingPanel1.
    1. User will click on EditColumn. The value for MyItem1 (text) will be assigned to RadTextBox1.Text.
    2. The same click event should enable RadToolBarButtons Button1 and Button2 (Enabled = true).

    #2 doesn't happen if I do #0.  I commented the RadAjaxmanager settings and all is good.


  4. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 19 Apr 2012 Link to this post

    Hi,

    Apparently this issue is related to the AjaxSettings of the manager. Please try including the RadToolBar1 as an updated control on RadGrid1 callback and see if this helps to resolve the described problem. Otherwise the toolbar will not be updated.

    However, I followed your scenario and prepared a sample project which demonstrates how this can be achieved. I am attaching my test page for your reference. Please open the RadAjaxManager Editor in design mode and see if everything is checked as expected.

    Give it a try and let me know if it helps or you need additional assistance.

    Kind regards,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. JR
    JR avatar
    11 posts
    Member since:
    Jul 2012

    Posted 23 Apr 2012 Link to this post

    Hi, 

    Does your approach work if the Radtoolbar is inside Content control?  I'm using a masterpage and one content section contains RadGrid and another content section has the RadToolbar.  
  6. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 26 Apr 2012 Link to this post

    Hello,

    You can implement the desired master-content page system to the provided project by following these steps:
    • place the RadAjaxManager in the master page
    • place the required controls in the content page according to your preferences
    • access and ajaxify them with the ajax manager

    The following articles describe this approach:
    Ajaxify Content Page Controls
    Ajaxify Multiple ContentPlaceHolders

    I hope this helps you to fix the ajax settings for RadToolbar.

    All the best,
    Eyup
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top