YYControls/SmartGridViewAlpha/SmartGridViewAlpha.cs

(开头部分) 50KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*----------
 * webabcd.cnblogs.com
 * 比较乱,懒得重构了
----------*/
using System;
using System.Collections.Generic;
using System.Text;

using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using System.Collections.Specialized;

namespace YYControls.SmartGridViewAlpha
{
    /// <summary>
    /// 继承自GridView
    /// </summary>
    [
    ToolboxData(@"<{0}:SmartGridViewAlpha runat='server'></{0}:SmartGridViewAlpha>"),
    System.Drawing.ToolboxBitmap(typeof(SmartGridViewAlpha), "icon.bmp"),
    ToolboxItem(false),
    ParseChildren(true),
    PersistChildren(false)
    ]
    public class SmartGridViewAlpha : GridView, IPostBackDataHandler
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public SmartGridViewAlpha()
        {
            this.PreRender += new EventHandler(SmartGridViewAlpha_PreRender);
        }

        /// <summary>
        /// SmartGridViewAlpha_PreRender
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">e</param>
        void SmartGridViewAlpha_PreRender(object sender, EventArgs e)
        {
            #region 改变通过CheckBox选中的行的样式 注册客户端脚本
            if ((!String.IsNullOrEmpty(ChangeRowCSSByCheckBox.CheckBoxID)
                && !String.IsNullOrEmpty(ChangeRowCSSByCheckBox.CssClassRowSelected))
                || !String.IsNullOrEmpty(CssClassMouseOver))
            {
                // 注册实现改变行样式的客户端脚本
                if (!Page.ClientScript.IsClientScriptBlockRegistered("jsChangeRowClassName"))
                {
                    Page.ClientScript.RegisterClientScriptBlock(
                        this.GetType(),
                        "jsChangeRowClassName", JavaScriptConstant.jsChangeRowClassName
                        );
                }
                // 注册调用双击CheckBox函数的客户端脚本
                if (!Page.ClientScript.IsStartupScriptRegistered("jsInvokeDoubleClickCheckBox"))
                {
                    Page.ClientScript.RegisterStartupScript(
                        this.GetType(),
后面还有 1144 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。