473,412 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Checkbox unchecked on clickevent in GridView

Hi ,
I have placed checkbox in my gridview ..
now when i check the chekbox and click anybutton the checkbox becomes
unchecked.

but when i normally add checkbox in the page it doesnt happen but it
happens when i add it to the gridview.
why is that ? i have added checkbox like this in my gridview:

.......
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" />
</ItemTemplate>
.....
what could be the reason...

waiting for ur reply...
Ciao,
Jay

Aug 9 '06 #1
1 1265
I have to give the code in :
if (!IsPostBack)

thats it.. it works fine...
Jayender wrote:
Hi ,
I have placed checkbox in my gridview ..
now when i check the chekbox and click anybutton the checkbox becomes
unchecked.

but when i normally add checkbox in the page it doesnt happen but it
happens when i add it to the gridview.
why is that ? i have added checkbox like this in my gridview:

......
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" />
</ItemTemplate>
....
what could be the reason...

waiting for ur reply...
Ciao,
Jay
Aug 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jack | last post by:
<i><input type="checkbox" name="chk_Complete" value="TRUE" <%Response.Write l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked" Else Response.Write " unchecked"%>> The above...
1
by: Stu Lock | last post by:
Hi, I have a checkbox in a gridview template column with autopostback turned on. I want to be able to handle this event but am unsure how. With other control of this nature I have used...
0
by: Jayender | last post by:
Hi , I have placed checkbox in my gridview .. now when i check the chekbox and click anybutton the checkbox becomes unchecked. but when i normally add checkbox in the page it doesnt happen but...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
3
by: r.hein | last post by:
I've got a middle tier data object that I'm binding a gridview to, and I'm having some problems with the check box, and having it enabled. Let'd start with the middle tier object (and the...
9
by: mike7510uk | last post by:
Hi, I am using a gridview with a templatefield containing a checkbox. I want to update the database with a 1 or 0 depending on if a checkbox is checked or unchecked (then use the 1 or 0 later on...
2
by: =?Utf-8?B?RXVnZW5l?= | last post by:
Hi, I have a problem with web development, using gridview and checkbox. My gridview has a few checkboxes, and I would retrieve the user modified values on Save submission (button click). The...
1
by: JPabich | last post by:
Does anyone know how to keep a checkbox checked when paging through a gridview. I have a check box control and when I check it, go to page 2 and then back to page 1, it is unchecked.
1
by: aurovinda | last post by:
Hi I send the detail code below.I have the problem when i click the checkbox there is no effect on the gridview's row.Again after a few seconds the checkbox is automatically unchecked.There is...
0
by: dotnetrookie | last post by:
Hi This is my 1st post.I have two checkbox columns in gridview binded through item template. The checkboxes are Category and Subcategory. I have actually removed the duplicate values in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.