[Q] Howto do a postback using a splitbutton?

  1. #1

    [Q] Howto do a postback using a splitbutton?



    Hi

    I have implemented an all purpose filter in my app, sqlDataSource.FilterExpression is set in a ajaxevent called by a splitbutton
    Working great - except for my combobox editors in the grid - they are not working after I have applied the filter

    I'd like to do an postback instead, but can I accomplish using a splitbutton?
    I have tried messing around setting the autopostback to true etc but to no avail
    Any hints?

    Thanks in advance
  2. #2

    RE: [Q] Howto do a postback using a splitbutton?

    Looks like this will do the trick

    // Filter - apply button
    ext.SplitButton _btnFilter = new ext.SplitButton();
    
    _btnFilter.ID = "btnFilter";
    _btnFilter.Text = "Set Filter";
    _btnFilter.Icon = ext.Icon.Cog;
    _btnFilter.AutoPostBack = true;
    _btnFilter.Click += new EventHandler(btnFilter_Click);
    _btnFilter.ToolTips.Add(Utils.PageUtils.CreateToolTip("Filter", "Set global filter"));
    
    // Remove ajax events and use postback as filtering gives a problem with grid editors (combos's not working) 
    //_btnFilter.AjaxEvents.Click.Event += new Coolite.Ext.Web.ComponentAjaxEvent.AjaxEventHandler(btnFilter_Click);
    //_btnFilter.AjaxEvents.Click.Failure = Scripts.Messages.AjaxErrorLoad();
    //_btnFilter.AjaxEvents.Click.EventMask.ShowMask = true;
    //_btnFilter.AjaxEvents.Click.EventMask.RemoveMask = false;
    //_btnFilter.AjaxEvents.Click.EventMask.Msg = "Sætter filter, et øjeblik ...";
    But I am missing the nice eventmask ...
    Anyone?

    Thanks



  3. #3

    RE: [Q] Howto do a postback using a splitbutton?

    Arghh I had a problem another place in the code which caused my editors to misbehave

    Note: Don't use gridpanel.reconfigure in ajaxevents as this can cause the combobox editors created in codebehind to not work correctly

    rgds

Similar Threads

  1. [1.0] Splitbutton and keyboard usage
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Feb 14, 2011, 11:36 AM
  2. [CLOSED] Images in SplitButton Menu off
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2010, 5:50 PM
  3. [CLOSED] StandOut Attribute of SplitButton
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 08, 2009, 8:04 PM
  4. [8.1] Splitbutton in gridpanel
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Oct 29, 2009, 5:13 PM
  5. [CLOSED] DateMenu in a SplitButton
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 15, 2008, 3:25 PM

Posting Permissions