Ejemplo n.º 1
0
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            Session["search"] = TextBoxSearch.Text;

            DataPagerContent.SetPageProperties(0, int.Parse(DropDownListPageSizes.SelectedValue), false);

            RefreshSizesAndData(true);
        }
Ejemplo n.º 2
0
        protected void ButtonClear_Click(object sender, EventArgs e)
        {
            TextBoxSearch.Text = String.Empty;
            Session.Remove("search");

            DataPagerContent.SetPageProperties(0, int.Parse(DropDownListPageSizes.SelectedValue), false);

            RefreshSizesAndData(true);
        }
Ejemplo n.º 3
0
        protected void ListViewContent_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
        {
            Session["startRowIndex"] = e.StartRowIndex;

            //set current page startindex, max rows and rebind to false
            DataPagerContent.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);

            RefreshData();
        }
Ejemplo n.º 4
0
        private void LoadPersistentSettings()
        {
            if (Session["distance"] != null)
            {
                DropDownListDistance.SelectedValue = Session["distance"].ToString();
            }
            else if (Settings["distance"] != null && Settings["distance"].ToString() != String.Empty)
            {
                DropDownListDistance.SelectedValue = Settings["distance"].ToString();
                Session["distance"] = Settings["distance"];
            }
            if (Session["filter"] != null)
            {
                TextBoxFilter.Text = Session["filter"].ToString();
            }
            else if (Settings["filter"] != null && Settings["filter"].ToString() != String.Empty)
            {
                TextBoxFilter.Text = Settings["filter"].ToString();
                Session["filter"]  = Settings["filter"];
            }
            if (Session["sortCriteria"] != null)
            {
                DropDownListSortCriterias.SelectedValue = Session["sortCriteria"].ToString();
            }
            int startRowIndex = 0;

            if (Session["startRowIndex"] != null)
            {
                startRowIndex = Convert.ToInt32(Session["startRowIndex"]);
                DataPagerContent.SetPageProperties(startRowIndex, 10, false);
                DataPagerContent2.SetPageProperties(startRowIndex, 10, false);
            }
            if (Session["pageSize"] != null)
            {
                int pageSize = Convert.ToInt32(Session["pageSize"]);
                DropDownListPageSizes.SelectedValue = pageSize.ToString();
                DataPagerContent.SetPageProperties(startRowIndex, pageSize, false);
                DataPagerContent2.SetPageProperties(startRowIndex, pageSize, false);
            }
        }
Ejemplo n.º 5
0
        private void LoadPersistentSettings()
        {
            if (Session["search"] != null)
            {
                TextBoxSearch.Text = Session["search"].ToString();
            }
            if (Session["genders"] != null)
            {
                RenderFromSession(CheckBoxListGenders, "genders");
            }
            if (Session["colours"] != null)
            {
                RenderFromSession(CheckBoxListColours, "colours");
            }
            if (Session["brands"] != null)
            {
                RenderFromSession(CheckBoxListBrands, "brands");
            }
            if (Session["styles"] != null)
            {
                RenderFromSession(CheckBoxListStyles, "styles");
            }
            if (Session["sortCriteria"] != null)
            {
                DropDownListSortCriterias.SelectedValue = Session["sortCriteria"].ToString();
            }
            int startRowIndex = 0;

            if (Session["startRowIndex"] != null)
            {
                startRowIndex = Convert.ToInt32(Session["startRowIndex"]);
                DataPagerContent.SetPageProperties(startRowIndex, 10, false);
            }
            if (Session["pageSize"] != null)
            {
                int pageSize = Convert.ToInt32(Session["pageSize"]);
                DropDownListPageSizes.SelectedValue = pageSize.ToString();
                DataPagerContent.SetPageProperties(startRowIndex, pageSize, false);
            }
        }