473,465 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to move to the next row an so on in DataGridView?

11 New Member
Dim i As Integer
Dim s As Integer
For i = 0 To 16
s = s + DatagridView2(i, 0).Value

Next i

Dim sa As Integer
For ia = 0 To 16
sa = sa + DatagridView2(ia, 1).Value
Next ia


If s = 11 Then
DatagridView2(17, 0).Value = s
Else
DatagridView2(17, 0).Value = 0
End If

If sa = 11 Then
DatagridView2(17, 1).Value = sa
End If

Is there a way to do the same till row 100.
Without having to change this 100 times.
"Dim i As Integer
Dim s As Integer
For i = 0 To 16
s = s + DatagridView2(i, 0).Value"

Thanks in advance
Jan 25 '11 #1
0 883

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

Similar topics

5
by: Rick | last post by:
I am moving throught a set of records, my next works great but previous move to the first record. Also what is the best way to check and see if it is the first or last record in the set. ...
2
by: Anand Ganesh | last post by:
Hi All, How to Implement Move Next, Move Previous, Last Record and First Record in a DataGrid Control ? Is there any standard tool available in the tool box button? Thanks for your time. ...
2
by: solar | last post by:
Is there a command in VB with which to move to the next row in the table of Access database ? For example my table TblCrates consists of : CrateId City 1. Berlin I need a...
2
by: ashasprabhu | last post by:
hai, How to move records to next and previous in asp.net as we do in VB6.0
55
by: indhu | last post by:
HI all one sequence has many panels. when i select combo it displays all the fields but panel has more rows. i want to view that also. how to do that? move next and previous commds are there...
3
by: dianaj86 | last post by:
I have multiple dropdownlists each one filled with values from a specific column in the table. Also I have multiple textboxes corresponding to dropdownlists. For example, when I select an item from...
10
by: fran7 | last post by:
Hi, Anyone know the simplest solution to add a next record link. I have this <a href="page.asp?author=<%=rsCard("author")%>">link</a> I am on a page with one record and want a link to go...
0
by: nithyamca | last post by:
Hi.. I want to use enter key to move the next column in datagrid view in vb.net and when ever press the enter key in last cell in grid it create the next row . actually i am hide some cells in...
2
by: edcha | last post by:
I have the Next XML var xml = new XElement( "clients", new XElement("client", new XAttribute("id",1), new XElement( "name", "Luis"), new XElement( "country", "Portugal") ), new...
3
by: steve proctor | last post by:
hi at the moment i can get this to load the contents of the first row,first column the number "1" into all the fields in the table "tblTransfer2" so all the fields have the number "1" in it where the...
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
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
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
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
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,...
0
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
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
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...
0
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 ...

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.