473,480 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to extract a cell value(not index) of a gridview?

3 New Member
Hi all,

I am getting trouble in exracting the value of a cell of gridview into a label. here is my code...

label1.text=gridview1.selectedrow.cells[0].text.tostring();

I dont know why I am not getting the value of the cell 0 of the selected row.
Any help??

code would be appreciated...

Thanks....
Nov 4 '08 #1
3 4572
nateraaaa
663 Recognized Expert Contributor
What gridview event are you writing this code in?

Nathan
Nov 4 '08 #2
vanc
211 Recognized Expert New Member
it's should be lable.Text = row.Cells[0].Value.ToString() not Text

cheers.
Nov 4 '08 #3
zafarbiet
1 New Member
In gridview rowediting event
dim x as string
x=gridview1.rows(e.neweditindex).cell(1).text


it works n returns value only of bound cell(1) in x....



enjoyyyyyy.....
Dec 23 '08 #4

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

Similar topics

1
36264
by: ck388 | last post by:
I'm trying to perform a select query on an oracle database but I get this error. ORA-01840: input value not long enough for date format My query is: SELECT * FROM TIGER.VIEW_TNW_MAINSTREAM...
11
2982
by: Kenneth Porter | last post by:
www.authoring.html, before I realized I was in the wrong place and this group made more sense.] I'm trying to figure out if this is my bug or a Gecko bug. Check out my test here: ...
1
5057
by: Steph. | last post by:
Hi, I have an object TFieldInfoList derived from ArrayList. How can I copy this object (the value, not the reference !) into an other one ?
6
1331
by: tshad | last post by:
If you have nothing in a cell, the cell doesn't have the inset appearance that all the other cells do. Normally, you could just put a "&ndsp;" in the cell if the it is blank. But how do you do...
2
3259
by: xenophon | last post by:
I added a Hidden Form Field to a form in the code behind. The value is being set in JavaScript client-side, but it is not persisting to the server in the PostBack. I know the value is being set...
2
7114
by: Suresh.P.R | last post by:
I am filling the Data Grid in the existing columns from the database. In the Item_Command event of the Data Grid I am writing the code to be execute while clicking on each item in the data grid. It...
2
15050
by: clogg02 | last post by:
Hi, I have bound a DataView to a DataGridView using this.dataGridView1.DataSource = new DataView(this.dataTable1); I allow for sorting of the datagridview using clicks on the headers. Later...
1
18138
by: emp | last post by:
This post went around back in January. I need some clarification. I have an enum declaring 30 enumerated values a=0 b=1 c=2 etc I have a switch statement that I don't want to use all 30...
1
1069
jrs85
by: jrs85 | last post by:
i need to know how to retrieve a selected cell (single cell) index. i would to retrieve a single selected cell DataTextField.. in my datagrid have hyperlink button.. i put it in databound so at...
0
7037
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
6904
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
7032
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
7076
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...
1
6730
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...
0
6873
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...
1
4767
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
4471
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...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.