473,394 Members | 1,721 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,394 software developers and data experts.

how to get selected row value from datagridview in richtextbox

i have 10 column in my datagridview. i want to get whole value from row(which row i'll select). i have this code but it's shows only one cell value,
Expand|Select|Wrap|Line Numbers
  1. richtextbox.Text = dataGridView1.CurrentCell.Value.ToString();
  2.  
Feb 18 '13 #1
1 6539
Bassem
344 100+
Hi,

Try this:
Expand|Select|Wrap|Line Numbers
  1. foreach (DataGridViewRow row in dataGridViewBatch.SelectedRows)
  2. {
  3.     bool alive = Convert.ToBoolean(row.Cells[0].Value);
  4.     string fileName = row.Cells[1].Value.ToString();
  5. }
Thanks,
Bassem
Feb 18 '13 #2

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

Similar topics

1
by: maflu | last post by:
Hello, I am rather a beginner in Javascript and have the following problem. There is a drop down list on my Web page with various values to be selected by the user. Once the user has selected a...
2
by: Patrick | last post by:
Hello, I have a drop down list that when a value is selected the page refreshes itself but the selected value changes back to the default value. I would like to keep the selected value after the...
0
by: Kannan.M.R | last post by:
Hi, I have a problem in assigning the selected value in the dropdown to a hidden control. It goes like this. I have a repeater control. In the repeater control’s item template, I have a...
1
by: jwright1 | last post by:
I am trying to set the selected value of a radio button list from a value stored in a table of a database. using vb codebehind asp.net. I tried binding the selected index item and selected index...
1
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in...
4
by: Robert Bravery | last post by:
HI all, In JS, how can I change the selected value of a dropdownlist(select options) I know the value of indexed value of the selected value before it is changed. Thanks Robert
2
by: Lars Erik Nes | last post by:
Hi I can't get this to work. I have a CustomerForm which display data from several tables in datagridviews. In another form (opened from CustomerForm), called NewCallForm, i have a listview...
1
by: Si | last post by:
I'm going round in circles trying to set a value as selected in a dropdown box on an ASP page. Basically this is the XML I've got: <rs:data> <z:row DirectorateID="67" DirectorateName="CEO"...
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: visweswaran2830 | last post by:
Hi, I am having datagridview in that I have datagridview combobox column and noraml textfield. I want to know that how can I load selected value in that combox box when I am loading all entered...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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?
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.