Esempio n. 1
0
        public void DoFilter(jQueryObject obj, bool postBack)
        {
            jQueryUIObject selects     = (jQueryUIObject)obj.Find("th select");
            string         filterValue = "";

            selects.Each((ElementIterationCallback) delegate(int index, Element el)
            {
                jQueryUIObject select = (jQueryUIObject)jQuery.FromElement(el);
                Array checkedItems    = select.MultiSelect("getChecked");

                if (checkedItems.Length > 0)
                {
                    if (filterValue.Length > 0)
                    {
                        filterValue = filterValue + ",,";
                    }

                    filterValue = filterValue + select.GetAttribute("name") + "=";

                    for (int i = 0; i < checkedItems.Length; ++i)
                    {
                        if (i > 0)
                        {
                            filterValue = filterValue + "||";
                        }

                        filterValue = filterValue + ((InputElement)checkedItems[i]).Value;
                    }
                }
            });

            if (this.Filter != filterValue)
            {
                this.Filter = filterValue;

                if (postBack)
                {
                    PostBack(0);
                }
            }
        }