Postback will fired allways

5 posts, 0 answers
  1. Ralf
    Ralf avatar
    77 posts
    Member since:
    Jun 2012

    Posted 06 Dec 2011 Link to this post

    Hi,

    on my web part there are some comboboxes. The comboboxes are defined in code behind (google like filtering for RadGrid).
    _filterbox.EnableLoadOnDemand = true;
    _filterbox.AutoPostBack = true;

    When I'm clicking into a combobox and leave it without doing a selection or entering text, a postback will be rised. Why?
    How can I prevent this?

    I'm using the newest Telerik verion.

    regards,
    Ralf


  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 08 Dec 2011 Link to this post

    Hi Ralf,

    When you are using the load on demand mechanism of the RadComboBox and you open the drop-down for the first time a callback to the server is made in order to load items. Could you please verify whether you refer to this callback or there is a real post-back happening?

    Best wishes,
    Dimitar Terziev
    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. Ralf
    Ralf avatar
    77 posts
    Member since:
    Jun 2012

    Posted 09 Dec 2011 Link to this post

    Hello Dimitar,

    I have checked. When I click into a combobox first time, the page properties IsPostBack and IsCallback are true. But When I'm click diretly into the second combobox IsPostBack is true and IsCallback is false. See attached screenshot to have a look to the behavior.
    If needed I can send a video.

    The _filterbox_ItemRequested event will be fired at click into the first combobox. The event will be not fired at the click into the second combobox.

    The grid is placed in a webcontrol that will be dynamically loaded into a web part (SharePoint 2010). The webcontrol has an asp updatepanel inside.

    Here is the defintion of the combobox:
    _filterbox = new RadComboBox();
    _filterbox.Skin = "Office2007";
    _filterbox.EnableLoadOnDemand = true;
    _filterbox.AutoPostBack = true;
    _filterbox.MarkFirstMatch = true;
    _filterbox.Height = Unit.Pixel(100);
    _filterbox.ItemsRequested += this.filterbox_ItemsRequested;
    _filterbox.SelectedIndexChanged += this.filterbox_SelectedIndexChanged;
    _filterbox.EnableViewState = true;
    _filterbox.Style.Add(HtmlTextWriterStyle.MarginRight, "5px");           
    _filterbox.LoadingMessage = "Laden...";
    _filterbox.EnableVirtualScrolling = true;
    _filterbox.ShowMoreResultsBox = true;
    _filterbox.ItemsPerRequest = 10;
    _filterbox.RegisterWithScriptManager = true;
    _filterbox.EnableTextSelection = true
    _filterbox.EnableItemCaching = true;
    _filterbox.EnableScreenBoundaryDetection = true;
    _filterbox.CloseDropDownOnBlur = true;
    _filterbox.MaxHeight = Unit.Pixel(100);
    _filterbox.Width = Unit.Pixel(150);
    _filterbox.Height = Unit.Pixel(80);
    _filterbox.DropDownWidth = Unit.Pixel(200);

    Hope this is needfull.

    Best regards,
    Ralf



     
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 13 Dec 2011 Link to this post

    Hi Ralf,

    I've inspected the code provided and there is no obvious reason for the experienced behavior. In order to adequately troubleshoot this issue, please open a support ticket and provide a runnable version of your web part along with the web control containing the RadGrid.

    Regards,
    Dimitar Terziev
    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. Ralf
    Ralf avatar
    77 posts
    Member since:
    Jun 2012

    Posted 20 Dec 2011 Link to this post

    Hi Dimitar,

    sorry for my late answer. We are under heavy load because of x-mas time :-)

    I have resolved the problem by disabling AutoPostBackOnFilter and implemented some client side functionality to get the expected behavior.
    For your information, we are using the rad controls mostly in webparts including asp update panels in a SharePoint context. Maybe the problem occurres from this side...

    Best regards,
    Ralf
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017