?
Solved

VB.Net DataViewGrid Problem

Posted on 2007-08-08
8
Medium Priority
?
227 Views
Last Modified: 2013-11-26
I am iterating through a grid to find out which rows have a checbox clicked (checkboxes are in column 1). They are all defaulted to clicked initially and I can unclick as many as i like. So for example if i unclick 2 out of eleven rows and hit the save button ,I am told that 10 rows are to be updated instead of 9. The last row unclicked is not recognised. Is there any way to update all the grid changes before hitting the save button.? Hope that makes sense.
Thanks,
M.
0
Comment
Question by:Marias099
5 Comments
 
LVL 39

Accepted Solution

by:
appari earned 500 total points
ID: 19654098
try calling datagridview.endedit method before starting your save process.
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 19654610
Wath does your save button (code)?
0
 

Author Comment

by:Marias099
ID: 19660505
The endedit method worked fine. Thanks.
0
 

Expert Comment

by:convertix
ID: 19674455
Dim ctlCheckbox as Control

For Each GVR as GridViewRow In GV.Rows
  ctlCheckbox = GVR.Cells(1).Controls(1)
  If TryCast(ctlCheckbox,CheckBox).Checked Then
     'Update
  End If
Next
   
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 19813472
>> The endedit method worked fine. Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question