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

推荐订阅源

V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
A
About on SuperTechFans
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
A
Arctic Wolf
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
J
Java Code Geeks
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
I
Intezer
L
LangChain Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
GRAHAM CLULEY
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 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);
    }