473,385 Members | 1,487 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.

Commit checkbox value immediately

I use vb.net in VS2012 and would like to be able to commit the value of a checkbox in a dgv immediately after I click the checkbox and the row to become not-dirty with the one click

The MSDN documentation says,
Expand|Select|Wrap|Line Numbers
  1. Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the DataGridView.CellClick event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the DataGridView.CellValueChanged event to respond to it. To commit the change when the cell is clicked, you must handle the DataGridView.CurrentCellDirtyStateChanged event. In the handler, if the current cell is a check box cell, call the DataGridView.CommitEdit method and pass in the Commit value. 
Use of .CommitEdit did not solve the problem.

John
May 14 '14 #1
0 1105

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
1
by: irene | last post by:
Hi, I am trying to update the checkbox value in a datagrid. I am using TemplateColumn to add the checkbox to the datagrid and it is showing correct data from the database now. Ideally, the end user...
3
by: Julius Fenata | last post by:
Dear all, I have checkbox on my webform, and I want that when I click my checkbox, it should change status between true or false... Here is my code, // Code Behind CheckBox1.Attributes =...
1
by: Art | last post by:
Hi, I have a problem with checkbox value on the page connected to MS Access. Ms Access field is: Independent - Data Type: Yes/No My code is: <form name="form" method="post"...
3
by: shobu | last post by:
passing array checkbox value and update the database <?include 'dbconnect.php'; error_reporting(0);$update_qr="update...
11
by: manjunath1985 | last post by:
Hi, I am really having problem in checkbox.... i have a php page which displays the username retrieved from the database i want to create a checkbox for each username and pass the selected...
2
by: palanidharma | last post by:
hi, i writing the code for selectd check box value deleted.but the code not working <?php include("conn.php"); $sel= mysql_select_db("sangoma"); //include("function.php"); ?>
5
by: ndeeley | last post by:
Hi, This is driving me mad - can someone guide me in the right direction please? I am outputting the results of a query to a webpage - in this case drawings in a database. The user selects the...
0
by: safuta | last post by:
i need help here. how do i display checkbox value from my database MS access in a visual basic 6 form? i hv 2 checkbox in my form, which are Available and Not Available. if the value is yes, i want...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.