473,403 Members | 2,183 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,403 software developers and data experts.

Getting RowIndex based on the multiple selected cells on a DataGridGiew

1
I'm trying to get the row indices based on my multiple selected cells on a DataGridView. How can I do that in VB.NET?

This is what I have:
Expand|Select|Wrap|Line Numbers
  1. If e.RowIndex >= 0 Then
  2.             Dim row As DataGridViewRow
  3.             row = Me.DataGridView1.Rows(e.RowIndex)
  4.             sno.Text = row.Cells("F2").Value.ToString
  5.             sname.Text = row.Cells("F3").Value.ToString
  6.             final.Text = row.Cells("F16").Value.ToString
  7.         End If
Oct 23 '15 #1
0 1002

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

Similar topics

3
by: darren | last post by:
How, using asp.net (vb.net), can I remove multiple selected items from a listbox. Everything I try does not seem to work. Thanks in advance.
3
by: zxo102 | last post by:
Hi there, I need your help for python <--> excel. I want to paste selected cells (range) to different location on the same sheet in Excel through python. I have tried it for a while but could not...
4
by: Neil | last post by:
I have a gridview which is being populated with no problems. I want to be able to reference the data from the cells in the row but having followed an example on MSDN cannot get any data to be...
0
by: WB | last post by:
Hi, I have a ListBox in a Windows form. This ListBox contains a list of products for a user to choose. It's bound to a DataSet like this: listBox1.DataSource = dsProducts.Tables;...
4
by: mimasci | last post by:
Hi, I have tried to write a code that allowed me to modify the value of the cells selected in a table, with excel has been easy. How one approaches selected cells? (To modify the value) How...
2
by: ManuelValdez | last post by:
Hello! I need your help to design an Excel macro to delete zeros only in selected cells. Thank you very much.
5
by: Max | last post by:
Is there any way to set a select-multiple type <select multiple="multiple"with multiple selected options in scripting? Any idea about this is appreciative.
1
by: angelicdevil | last post by:
i have listbox 1 which displays status , based on selection of status listbox 2 displays usernames. and based on username selected the textbox displays the email id. its working fine till...
1
by: polluxsoftech | last post by:
HI, I have 1 listbox named lbCountry i have inserted each selected value from listbox into database by following code: For iLoop = 0 To lbCountry.Items.Count - 1 ' item selected Dim i...
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: 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
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
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
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...

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.