473,491 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help On GridView

Hello,

I have a question about assigning a value in the selectedRow of a
gridview to another variables.
How can I do that?
I am trying the following but it wont work;
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
GridView1.SelectedIndexChanged
Label1.Text = GridView1.SelectedRow.Cells(0).ToString
End Sub
Label1 gets the value: "System.Web.UI.WebControls.DataControlFieldCel l"

actually I am trying to assign the value in the row as an ImageURL. I
think GridView should be able to do it, but I couldnt to either.

Aug 2 '06 #1
1 1401
snt
Try Label1.Text = GridView1.SelectedRow.Cells(0).Text

snt
http://www.flexoweb.com
http://www.tec-adv.com

Dot Net Daddy wrote:
Hello,

I have a question about assigning a value in the selectedRow of a
gridview to another variables.
How can I do that?
I am trying the following but it wont work;
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
GridView1.SelectedIndexChanged
Label1.Text = GridView1.SelectedRow.Cells(0).ToString
End Sub
Label1 gets the value: "System.Web.UI.WebControls.DataControlFieldCel l"

actually I am trying to assign the value in the row as an ImageURL. I
think GridView should be able to do it, but I couldnt to either.
Aug 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
10217
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
1
9330
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page which is created in runtime. It works fine. My page has 2 Asp Buttons: - The HIDE button makes GridView.Visible = False; - The SHOW button makes...
0
2267
by: Aws | last post by:
My crazy GridView !! I am using Visual Studio 2005, I have a problem with my GridView. I have one access .mdb table and when I update a record on the table EVERYTHING is perfect. I made a Web...
0
1223
by: Wannabe | last post by:
I have been trying to figure this out for days now...can someone please help? I am using ASP.Net 2.0 and have a gridview on my page. I have everything working except the delete command. The page...
8
18066
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
4
3044
by: Bill | last post by:
Say I want to pull a bunch of records from a contacts database into a gridview and one of the fields contains an email address. Now suppose I want to make that email address clickable by putting it...
0
1506
by: trint | last post by:
I hope I can explain this clearly enough to get help. I have three gridviews that need to work from each other to display like a java verticle menu (just in the way it appears). GridView1 is...
0
2121
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i...
0
4635
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box...
0
1521
by: joelgarcia007 | last post by:
I really hope someone can help me with this because it's really driving me crazy. I need to dynamically display multiple data tables on a page so I am using a Repeater to do so and in the...
0
7118
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
6980
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
7192
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
7364
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
5452
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,...
1
4886
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
4579
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
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
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.