473,513 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid Checkboxes Behaviour

Has anyone tried this.

Take any table in a database (ex. Customers Table in the Northwind
database). and add a new column to it called test. let the data type of test
be "bit".

do a select * query on this new table and display the results in a DataGrid
Control.

You will see check boxes in the columns of this field. try clicking on these
check boxes to check and uncheck a box. you will notice that it takes 2
clicks to uncheck the box. on first click the cell turns gray
and on the second click the box is actually gets unchecked. this behaviour
is annoying as the box should change state in just one click.

It will be very kind if someone tries to simulate what I have done and let
me know if the same problem is occurring. Is this a bug... Can there be some
workaround for this ?

I'll be very gratefull for any help/comments
Jul 21 '05 #1
1 1007
For one-click checkboxes you need to override OnMouseDown() routine of your
grid

"Nagabhushan Ammu" <Na*************@discussions.microsoft.com> wrote in
message news:DC**********************************@microsof t.com...
Has anyone tried this.

Take any table in a database (ex. Customers Table in the Northwind
database). and add a new column to it called test. let the data type of test be "bit".

do a select * query on this new table and display the results in a DataGrid Control.

You will see check boxes in the columns of this field. try clicking on these check boxes to check and uncheck a box. you will notice that it takes 2
clicks to uncheck the box. on first click the cell turns gray
and on the second click the box is actually gets unchecked. this behaviour
is annoying as the box should change state in just one click.

It will be very kind if someone tries to simulate what I have done and let
me know if the same problem is occurring. Is this a bug... Can there be some workaround for this ?

I'll be very gratefull for any help/comments

Jul 21 '05 #2

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

Similar topics

2
1702
by: Mortar | last post by:
i have a datagrid with a column of html checkboxes which are created dynamically. The id/name of the checkboxes comes from a value in the database. on a postback, i would like to get all the checked checkboxes, in the same way old asp would. i.e. for each control in Request.Form... i am doing it this way because the datagrid will contain...
7
2406
by: DJ Dev | last post by:
Hi All, I have a complex problem. I have dropdownlists (usually 3-5) and the user selects some value from these and for each value selected, datagrids are shown to the user. I am creating the Datagrids dynamically using a loop depending on the number of Dropdownlists. The datagrids also have a checkbox template column. Now my problem is that...
2
3178
by: john | last post by:
I posted this question to comp.lang.javascript but didn't get a response, so I'll try here. I am using ASP.NET and I have a datagrid. One of the columns in my grid is all checkboxes. When the user clicks on a certain button on the page, which is not in the grid, I want to be able to traverse through all the checkboxes in that column and see...
2
2445
by: Mortar | last post by:
i have a datagrid with 2 columns. the 1st column contains an id which will be used by the database for the selected checkbox records. the 2nd column is a template column containing a server checkbox control. where i'm at: i can retrieve a count of the selected checkboxes, but don't know how to get the related id's (in the 1st column).
7
2889
by: Jaime Stuardo | last post by:
Hi all.. I have a DataGrid with checkboxes. In the header I have a "check all" checkbox. I'm wondering if there is an easy way to check all checkboxes using that checkbox. I could do it using JavaScript code, but the main problem I have is that checkboxes ids aren't kept when the datagrid is rendered, for example, if the checkboxes have...
3
1797
by: GatorBait | last post by:
Hi all, I'm using a datagrid for the first time and I am running into some problems that I hope someone can help me with. I have a datagrid with 18 rows and 5 columns....column 1 is just text and columns 2-5 are checkboxes. Some of the checkboxes have to be invisible, and in some cases some of the checkboxes have be be enabled=false. I...
1
281
by: Nagabhushan Ammu | last post by:
Has anyone tried this. Take any table in a database (ex. Customers Table in the Northwind database). and add a new column to it called test. let the data type of test be "bit". do a select * query on this new table and display the results in a DataGrid Control. You will see check boxes in the columns of this field. try clicking on these
7
2492
by: rn5a | last post by:
The first column of a DataGrid has a CheckBox for all the rows. I want that when users check a CheckBox, the BackColor of that entire row in the DataGrid should change to a different color. To implement this, if I am not mistaken, I HAVE TO post the Form first i.e. set the AutoPostBack property of the CheckBox to True. Without posting the...
5
2862
by: rn5a | last post by:
In my application, I want to populate all the directories & files existing in a directory on the server in a DataGrid. To ensure that all the directories get listed first followed by all the files, I am appending all the directories with 0 & all the files with 1. Moreover, each directory & file listed in the DataGrid will have a...
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7565
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7128
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5103
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.