ajaxsetting for radcombobox inside usercontrol

7 posts, 0 answers
  1. MBEN
    MBEN avatar
    159 posts
    Member since:
    Nov 2011

    Posted 17 Sep 2012 Link to this post

    Hi,

    On my content page I have a usercontrol and a radgrid.
    I have a radcombobox inside the user control. On changing the sleection in the combobox I need to update the grid but it ends with a page flash. How can i add the radcombobox to the ajaxsettings to remove the page flash/postback when updating the grid?

    I have tried adding the combo and the grid in ajaxsetting dynamically but that does not help either.

    Please suggest.
  2. Kostadin
    Admin
    Kostadin avatar
    1709 posts

    Posted 20 Sep 2012 Link to this post

    Hello,

    If you have a control in UserControl that should ajaxify a control in the main page, the AjaxSetting should be added in the code behind. Take a look at the following code:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager1.AjaxSettings.AddAjaxSetting((User control ID).FindControl("RadComboBox ID"), RadGrid1);
    }

    I also prepared a small sample and attached it to this post.

    Regards,
    Kostadin
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. MBEN
    MBEN avatar
    159 posts
    Member since:
    Nov 2011

    Posted 20 Sep 2012 Link to this post

    Hi,

    I tried the code and it does not work in my case.
    I forgot to mention that I am using a master-content page so the grid is on the content page. I have a RadAjaxManagerProxy on my content page. Does that make a difference?

    I tried the code sample with adding a master page and it stopped working as desired.Could you give me a working sample with a master-content scenario?
  5. Kostadin
    Admin
    Kostadin avatar
    1709 posts

    Posted 25 Sep 2012 Link to this post

    Hello,

    It does not make any difference. RadAjaxManager could handle all the MasterPage and WebUserControls scenarios no matter the complexity of the application. The following code show how you could achive this:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager mngr = RadAjaxManager.GetCurrent(Page);
        mngr.AjaxSettings.AddAjaxSetting(combo1.FindControl("RadComboBox1"), RadGrid1);
     
    }

    I modify the sample from my previous post and attached it again. Additionally you could check out this help article for more information.

    All the best,
    Kostadin
    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.
  6. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 10 Oct 2012 Link to this post

    How to add Ajaxsetting in javascript as well as how to remove Ajaxsetting in javascript.

    In C#, i know how to use it. but in javascript i have no idea.
      RadAjaxManager1.AjaxSettings.Clear();
      RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, drpType);
  7. Kostadin
    Admin
    Kostadin avatar
    1709 posts

    Posted 15 Oct 2012 Link to this post

    Hi Waseem,

    The AjaxSettings collection of RadAjaxManager can be modified only server-side. If you are still unable to achieve your goal using server-side settings, you could prepare a runnable sample that reproduces the problem that you are facing and send it to us in a formal support ticket, so we can help you fix it.

    Kind regards,
    Kostadin
    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.
  8. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 15 Oct 2012 Link to this post

    Thanks Kostadin
    I solved it.
    ViewState["Testing"]=1;

    Basically I open RadWindow (Parent). In RadWindow i have many textbox and many drop down. so i have button at the end of every dropdown. when i click it. it will open another RAdwindow where we can insert value to drop down. so when i insert record.i don't want to refresh parent whole page. i want to refresh only selected drop down. i don't want loose all my input values and as well as other selected drop down values. i only want to refresh selected dropdown.
    I handle it on load event. When i click on button at the selected drop down. i add value to viewstate as well as remove all old ajax setting and add ajax setting to  only selected drop down. so when child drop down is closed. only selected drop down is refresh.

    Regards
    Muhammad Waseem
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017