how to disable templated buttonfield depending on bitfield in unbound aspnet gridview
<p>I have an  table that consist of 5 bitcolumns and 2 text textcolumns. The bitcolumns should be enabele/ disabele an templated buttonfield.</p>

<p>buttonfield: btnUitgeleend should be manipulated buy column Uitgeleend witch is a column with an bitvalue.</p>

<p>trying to get to the bit value with;</p>

<pre><code>protected void gridStatussen_RowDataBound(object sender, GridViewRowEventArgs e) 
{}
</code></pre>

<p>and</p>

<pre><code>protected void gridStatussen_RowCommand(object sender, GridViewCommandEventArgs e)
{}
</code></pre>

<p>Did not get me any result.</p>

<p>How to tackle this problem? </p>

<pre><code>&lt;asp:GridView ID="gridStatussen" runat="server" 
            onrowdatabound="gridStatussen_RowDataBound" 
            onrowcommand="gridStatussen_RowCommand"&gt;
            &lt;Columns&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/home.png" ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="btnBinnen" runat="server" CommandArgument='&lt;%#Eval("Uitgeleend")%&gt;' CausesValidation="false" CommandName="Binnen" 
                            Text="binnen" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/document-invoice.png" 
                    ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="Button2" runat="server" CausesValidation="false" CommandName="" 
                            Text="gereserveerd" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/home-share.png" ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="btnUitgeleend" runat="server" CommandArgument='&lt;%#Eval("Uitgeleend")%&gt;' CausesValidation="false" CommandName="Uitgeleend"
                            Text="uitgeleend" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/toolbox.png" ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="Button4" runat="server" CommandArgument='&lt;%#Eval("Reinigen")%&gt;' CausesValidation="false" CommandName="Onderhoud"
                            Text="onderhoud" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/_0031_Tools.png" 
                    ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="btnStukken" runat="server" CommandArgument='&lt;%#Eval("Stukken")%&gt;' CausesValidation="false" CommandName="Stukken"
                            Text="stukken" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderImageUrl="~/knoppen/clipboard-invoice.png" 
                    ShowHeader="False"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:Button ID="btnFactuur" runat="server" CausesValidation="false" CommandName="" 
                            Text="factuur" /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
        &lt;/asp:GridView&gt;
</code></pre>
