View Full Version : [Q] Howto do a postback using a splitbutton?

Apr 07, 2009, 4:57 PM

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

Apr 08, 2009, 3:20 AM
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.CreateTool Tip("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.AjaxEventHandle r(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 ...


Apr 08, 2009, 6:15 AM
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