日期:2014-05-19  浏览次数:20420 次

网上找了一个改写的GridView类,不知道怎么用,大家看看
using   System;
using   System.Collections.Generic;
using   System.ComponentModel;
using   System.Text;
using   System.Web;
using   System.Web.UI;
using   System.Web.UI.WebControls;
using   System.Reflection;
using   System.Text.RegularExpressions;

namespace   ZLDK.JXGL.WebControls
{    
        [ToolboxData( " <{0}:uGridView   runat=server> </{0}:uGridView> ")]
        public   class   uGridView   :   GridView,   iuControl
        {
                //委托事件
                public   delegate   void   SelectNumberEventHandler(SelectNumberEventArgs   e);

                private   static   int   summaryCount   =   0;   //保存其数量值
                private   Paging.PagingStyleCollection   _pagingStyle;   //是否要进行分页


                #region   构造函数
                public   uGridView():   base()
                {
                        ViewState[ "IsHandle "]   =   true;
                        ViewState[ "IsFixHeader "]   =   true;
                        //   新增“uGridView_RowDataBound”事件处理
                        this.RowDataBound   +=   new   GridViewRowEventHandler(uGridView_RowDataBound);
                }
                #endregion

                #region   属性
                [Bindable(true)]
                [Category( "Appearance ")]
                [DefaultValue( " ")]
                [Localizable(true)]
                public   string   CodeID
                {
                        get
                        {
                                String   s   =   (String)ViewState[ "CodeID "];
                                return   ((s   ==   null)   ?   String.Empty   :   s);
                        }

                        set