Helllo there
I am new to programming
i am trying to update my checkbox column in a gridview (asp.net)which i cont
I can able to get the data 1 or 0 in database and able to update the checkbox as checked or unchecked
my code is

<asp:TemplateField HeaderText="Available" SortExpression="Available">
                <EditItemTemplate>
                    <asp:CheckBox Id="chkSelect" Checked='<%# ConvertToBool(Eval("Available")) %>' Runat="Server" />
                     </EditItemTemplate>
                <ItemTemplate>
                    <asp:CheckBox Id="chkSelect" Checked='<%# ConvertToBool(Eval("Available")) %>' Runat="Server" />
                    </ItemTemplate>
            </asp:TemplateField>

please help in this bug i am scratching my head for last 3 days
thanks in advance

Recommended Answers

All 5 Replies

why no ones replying ??
is it too hard !!!

soooo tensed :(

Control ID must be unique and use FindControl Method to get reference of CheckBox control.

thanks for replying
i got the the control ID must be unique thing

but i am a bit confuse with Find control method can you please explain....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.