473,385 Members | 1,907 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,385 software developers and data experts.

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 1004
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
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...
7
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...
2
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...
2
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...
7
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...
3
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...
1
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 *...
7
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...
5
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,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...

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.