Exemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="E:PreRender"/> event.
        /// </summary>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            // Storeave the filter criteria of the list in Page's viewstate.
            // This enables post-back events such as sorting and paging to operate on the correct data source.
            ViewState["FilterCriteria"] = FilterCriteria.Select(c => c.ToString()).ToArray();

            GetGridList().Perform(g => g.Attributes["CurrentSort"] = SortExpression);
        }