Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 I need help on retrieving from an Invisible Colum

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-08-05 : 15:46:21
Hi Group,

I need help. I am working with a GridView that contain 5 visible Columns and two(2) invisible columns.

I need the values of the two invisible columns but since they are set to be invisible when I passed to a Session Variable it come out as empty or "Nothing".

Enclosed is some of the code I have tried...Need help thanks!!

[Code]


Protected Sub SqlDataGridPopulation_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataGridPopulation.Selecting

Try
Dim strSql As String = SqlDataGridPopulation.SelectCommand = "SELECT ChartObject, NetObject FROM dbo.webreportdata"

Session("StrChart") = SqlDataGridPopulation.SelectCommand = "Select ChartObject FROM dbo.webreportdata"
Session("strNet") = GridView1.SelectedRow.Cells(7).Text.ToString

Catch xcp As Exception
txtError.Visible = True
txtError.Text = "Error on page load. " & xcp.Message
End Try
End Sub

[/code]

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2008-08-05 : 17:33:29
Ok. can someone guide to a good VB.Net forum...somewhere where I can post the question. I understand that this forum is really good for SQL questions.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-05 : 17:55:48
I believe we've suggested www.asp.net in the past to you.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -