Issue with getting correct state of the checkbox in gridview
<p>I have a nested gridview. In inner gridview, I have a column that contains checkboxes one per each row.</p>

<pre><code>&lt;asp:GridView ID="OuterGridView" runat="server" Width="80%" AutoGenerateColumns="false"
DataKeyNames="PartnerID,PromotionId" CssClass="GridViewCss"&gt;
&lt;Columns&gt;
    &lt;asp:TemplateField HeaderText="Header1" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
        ItemStyle-Width="20%"&gt;
        &lt;ItemTemplate&gt;
            &lt;asp:LinkButton ID="Edit" Text='&lt;%#Eval("Org") %&gt;'
                runat="server"&gt;&lt;/asp:LinkButton&gt;
            &lt;img alt="" style="cursor: pointer" src="images/ex.gif" /&gt;
            &lt;div style="overflow: scroll; display: none; height: 100px;"&gt;
                &lt;asp:GridView ID="InnerGridView" runat="server" AutoGenerateColumns="false"
                   ShowHeader="false"&gt;
                    &lt;Columns&gt;
                        &lt;asp:TemplateField ItemStyle-HorizontalAlign="Left"&gt;
                            &lt;ItemTemplate&gt;
                                &lt;asp:CheckBox Text='&lt;%#Eval("School") %&gt;'
                                    ID="CheckBoxInner" Checked='&lt;%#Eval("IsActive") %&gt;' runat="server"
                                    ViewStateMode="Enabled" EnableViewState="true" /&gt;
                            &lt;/ItemTemplate&gt;
                        &lt;/asp:TemplateField&gt;
                    &lt;/Columns&gt;
                &lt;/asp:GridView&gt;
            &lt;/div&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
    &lt;asp:TemplateField HeaderText="Header2" HeaderStyle-HorizontalAlign="Left"
        ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%"&gt;
        &lt;ItemTemplate&gt;
            &lt;asp:CheckBox Text="All" ID="CheckBoxOuter" runat="server" OnCheckedChanged="GridViewOuterCheckedChange"
                AutoPostBack="true" EnableViewState="true" /&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
&lt;/Columns&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>I bind the gridviews when !ispostback. When I check any of the inner checkboxes, and try to save with save button, in button click event, I get proper values for checkboxes. But if I uncheck any of the ckeckbox (with Checked=True), in save button click event for that particular checkbox; I get the checked value as True instead of False. </p>
