惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

SecWiki News
SecWiki News
量子位
The Cloudflare Blog
美团技术团队
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
Spread Privacy
Spread Privacy
P
Proofpoint News Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 三生石上(FineUI控件)
T
Tor Project blog
博客园 - 司徒正美
宝玉的分享
宝玉的分享
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Secure Thoughts
T
Threat Research - Cisco Blogs
Hacker News: Ask HN
Hacker News: Ask HN
Jina AI
Jina AI
博客园 - 聂微东
A
Arctic Wolf
I
Intezer
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
小众软件
小众软件
T
Tailwind CSS Blog
The Hacker News
The Hacker News
L
LINUX DO - 最新话题
Hacker News - Newest:
Hacker News - Newest: "LLM"
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
TaoSecurity Blog
TaoSecurity Blog
Project Zero
Project Zero
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cloudbric
Cloudbric
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Troy Hunt's Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V2EX - 技术
V2EX - 技术
The GitHub Blog
The GitHub Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog

博客园 - kenly33

ORM及代码生成器和插件C#源码(最新版Kenly.DBFramework4.5.8.5) 處理RadioButtonList客戶端事件 - kenly33 - 博客园 对象关系映射架构(DBFramework)及代码生成器和插件(源码) 使對象支持自定義比較 統計分數 讀寫XML文檔 - kenly33 - 博客园 Visual Studio Team System简介 过滤某些字段重复的记录 MultiFileUploador GridViewNavigator 兩個輸入框只允許一個輸入 Gridview中梆定得RadioButton Javascript 隱藏或顯示某區域 ASP.NET 2.0中合并 GridView 的表头单元格 VS2005 RESOURCE MANAGEMENT 鲸鱼哲学 Javascript彈出對話框 FxCop Rules Atlas使用演练
Gridview梆定
kenly33 · 2007-04-20 · via 博客园 - kenly33

<asp:GridView ID="gvSupplier" runat="server" PageSize="20" AutoGenerateColumns="False" Width="100%" OnDataBound="gvSupplier_DataBound" OnRowDataBound="gvSupplier_RowDataBound" AllowPaging="True">
        <Columns>
            <asp:BoundField HeaderText="No." >
                <ItemStyle Width="30px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="Delete">
                <ItemTemplate>
                    <asp:CheckBox ID="chkDelete" runat="server"  Enabled='<%# CanDelete(Eval("IsResponsible"),Eval("HasRegistered")) %>'  Checked='<%# CanDelete(Eval("IsResponsible"),Eval("HasRegistered")) %>' Width="50px" />
                </ItemTemplate>
                <HeaderStyle Width="50px" />
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblSupplierID" runat="server" Text='<%# Bind("SupplierID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <ItemTemplate>
                    <asp:Label ID="lblRowID" runat="server" Text='<%# Bind("RowID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="RegisterCode" HeaderText="RegisterCode">
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="CNSupplierName" HeaderText="CNSupplierName" />
            <asp:BoundField DataField="ENSupplierName" HeaderText="ENSupplierName" />
            <asp:CheckBoxField DataField="IsGlobalSupplier" HeaderText="IsGlobalSupplier" />
            <asp:CheckBoxField DataField="IsActiveSupplier" HeaderText="IsActive">
                <ItemStyle Width="100px" />
            </asp:CheckBoxField>
            <asp:CheckBoxField DataField="IsResponsible" HeaderText="IsResponsible">
                <ItemStyle Width="100px" />
            </asp:CheckBoxField>
             <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# GetNavigateUrl(DataBinder.Eval(Container.DataItem, "SupplierID").ToString()) %>'>
                    Details</a>
                </ItemTemplate>
                 <ItemStyle Width="100px" />
            </asp:TemplateField>
        </Columns>
        <PagerSettings Visible="False" />
    </asp:GridView>

 public bool CanDelete(object isResponsible, object hasRegistered)
    {
        bool responsible;
        bool registered;
        bool.TryParse(isResponsible.ToString(), out responsible);
        bool.TryParse(hasRegistered.ToString(), out registered);
        return responsible & (!registered);
    }