473,506 Members | 9,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2005 Studio headache

Hi all. Sorry about the crude headline but this problem is really
giving me a headache. See I am currently deloping an app in Visual
Studios 2005 C# Lanuage and the thing is like this: I have a
DataGridView on my form. In this DataGridView is a
DataGridViewCheckBoxColumn and I want to get the value (either true or
false) as I click on the cell(meaning when I change the checked box
unchecked or the other way around) Now like a regular checkbox I want
to use something like Checked so that I can also change the column
programmatically. But there isn't any events or something like that.
The DataGridView is not databound to my database. The connections and
commands are handled seperately in another program. All I want is a
messagebox to show me after I clicked on the DataGridCheckBoxColumn to
show me either checked(true) or unchecked(false)

Please can anybody help me. I gratly appreciate any kind of help on
this.

Thanks
Echo

Mar 14 '06 #1
3 1442
Have you looked at the CellClick event?

Mar 14 '06 #2
Did you check out the current cell value

like this

I hope this helps you out :-)

private void dgrd_RowValidating(object sender,
DataGridViewCellCancelEventArgs e)
{

if (
dgrd.CurrentRow.Cells[0].Value == null
||

String.IsNullOrEmpty(dgrd.CurrentRow.Cells[0].Value.ToString())
)
{
bool b=Convert.ToBoolean(dgrd.CurrentRow.Cells[0].Value);
}
}

"Echo" wrote:
Hi all. Sorry about the crude headline but this problem is really
giving me a headache. See I am currently deloping an app in Visual
Studios 2005 C# Lanuage and the thing is like this: I have a
DataGridView on my form. In this DataGridView is a
DataGridViewCheckBoxColumn and I want to get the value (either true or
false) as I click on the cell(meaning when I change the checked box
unchecked or the other way around) Now like a regular checkbox I want
to use something like Checked so that I can also change the column
programmatically. But there isn't any events or something like that.
The DataGridView is not databound to my database. The connections and
commands are handled seperately in another program. All I want is a
messagebox to show me after I clicked on the DataGridCheckBoxColumn to
show me either checked(true) or unchecked(false)

Please can anybody help me. I gratly appreciate any kind of help on
this.

Thanks
Echo

Mar 14 '06 #3
Hi me again. Thanks for the replies but actually none of them actually
work. It brings me with a messagebox that shows 'true' all the time
until I press Enter key twice then it changes to false. Here is a
sample code for a standard checkbox. Is there a way on how I can use it
with that column?

eg. MessageBox.Show(checkBox1.Checked.ToString());

See I am looking for a code snippet but I can't find it for the
DataGridViewCheckBoxColumn that can also use the Checked.ToString()
function. Is there another way around?
Thanks for the replies and help.

Echo

Mar 15 '06 #4

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

Similar topics

3
2289
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in...
13
1922
by: Howard Kaikow | last post by:
I just visited the MSFT web site and saw the comparison/pricing of the different VS 2005 versions. I was looking for a statement of the system requirements for VS Pro and VSTO, could not find. ...
54
6385
by: m.roello | last post by:
In the book: "Working with Microsoft Visual Studio 2005" Craig Skibo wrote: "The power of Visual Studio 2005 lies in its ability to empower users to build, test, and debug powerful applications...
4
1827
by: Learner | last post by:
we can download the Management Studio Express for free from MS website. I did the same thing on my personal laptop. But can we develop applications using free downloaded Management Studio and...
3
1377
by: dean4if | last post by:
I have 4 Windows 2000 Servers. I have installed the DotNet Framework 2.0 on all 4 servers. Three of these servers show a tab for ASP.NET in the IIS MMC and are running Visual Studio 2003. ...
0
3310
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
10
2498
by: WT | last post by:
Hello, I have been publishing my web site many times to the remote where resides my final web site. Everything was ok, but to-day, without any configuration change, vs doesn't copy final files...
3
6035
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
6
1856
by: Author | last post by:
I have VS 2005 professional. Here is the version info: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP .050727-7600) © 2005 Microsoft Corporation. All rights reserved. When I...
0
7105
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
7308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7371
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
7479
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
5617
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,...
1
5037
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
4702
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...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
410
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...

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.