Click here to Skip to main content
15,891,757 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

Hope some one can help me to get the state of the checkbox in the gridview here is the gridview code:
XML
<asp:GridView ID="grid" runat="server" Style="margin-left: 0px" AutoGenerateColumns="False"
            CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="700px"
            DataKeyNames="OrderCode" OnRowEditing="grid_RowEditing" OnRowDeleting="grid_RowDeleting"
            CssClass="tabela" HorizontalAlign="Center" AlternatingRowStyle-HorizontalAlign="Center"
            RowStyle-HorizontalAlign="Center" AllowPaging="True" OnPageIndexChanging="grid_PageIndexChanging">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Center" />
            <Columns>
                <asp:BoundField DataField="OrderCode" HeaderText="Код на нарачка" />
                <asp:BoundField DataField="DateCreated" HeaderText="Дата на креирана нарачка" />
                <asp:CheckBoxField DataField="Payed" HeaderText="Платено" />

                <asp:CheckBoxField DataField="ReadyForShipping"  HeaderText="Спремно за испорака" />
                <asp:CheckBoxField DataField="Shipped" HeaderText="Испратено" />
                <asp:CheckBoxField DataField="Delivered" HeaderText="Доставено" />
                <asp:CheckBoxField DataField="Cashed" HeaderText="Исплатено" />
                <asp:BoundField DataField="ProductName" HeaderText="Име на производ" />
                <asp:BoundField DataField="UnitCost" HeaderText="Цена" />
                <asp:BoundField DataField="Size" HeaderText="Големина" />
                <asp:BoundField DataField="Quantity" HeaderText="Количина" />
                <asp:TemplateField HeaderText="Спремно за испорака" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:ImageButton ID="Agree" runat="server" ImageUrl="../Dodatoci za Master/agreee.png"
                            CommandName="Edit" OnClientClick="return confirm('Дали производот е спремен за испорака (соодветно спакуван)?');"
                            AlternateText="Give Permission" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Откажи нарачка" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:ImageButton ID="Cancel" runat="server" ImageUrl="../Dodatoci za Master/delete.png"
                            CommandName="Delete" OnClientClick="return confirm('Дали сте сигурни дека сакате да ја откажете нарачката?');"
                            AlternateText="Give Permission" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
Posted
Updated 13-Mar-13 11:19am
v2

1 solution

In the absence of any other answers, check out the worked example in the answer to this question for a few pointers...

http://stackoverflow.com/questions/3084419/checkboxfield-columns-in-asp-net-gridview-are-disabled-even-if-readonly-set-to-f[^]

If that doesn't help please show how you're populating the data.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900