Strange as my email showed up to the group actually shows up after your
reply..... wow. I have it all correct now except for one error.
'DataRow' is not a member of 'System.Web.UI.WebControls.DataGridItem'.
which happens on this line:
Dim FileRow As DataRowView = e.Item.DataRow
What I have now is:
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Dim FileRow As DataRowView = e.Item.DataRow
Dim FileLink As HyperLink = e.Item.FindControl("FileHyperLink")
Dim FileName As String = FileRow("Name")
FileLink.NavigateUrl = String.Format("http://{0}/",
DomainVariable, FileName)
FileLink.Text = FileRow("Name")
End If
I set the domain variable in code already so that is fine. Sorry about all
the dumb questions, I know much more about repeaters and have used them but
very new to datagrids.
_____
From: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOk
yahoogroups.com
[mailto: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOk
yahoogroups.com] On Behalf Of Dean Fiala
Sent: Friday, September 07, 2007 10:22 AM
To: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOk
yahoogroups.com
Subject: Re: [AspNetAnyQuestionIsOk] New to datagrids question
DataViewRow
should be
DataRowView
Dim FileLink As HyperLink = e.Item, FindControl("FileHyperLink")
should be
Dim FileLink As HyperLink = e.Item.FindControl("FileHyperLink")
On 9/7/07, mbelcher <AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40faroutcomputersystems.com>
Ok%40faroutcomputersystems.com">Ok
faroutcomputersystems.com> wrote:
>
> Okay I have the following imports:
>
> Imports System.Data.OleDb
>
> Imports System.Data
>
> Imports System.IO
>
>
>
> I am getting the following 2 errors in the code; trying to figure them out
> as I write this.
>
>
>
>
>
> If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
> ListItemType.AlternatingItem Then
>
>
>
> Dim FileRow As DataViewRow = e.Item.DataRow
>
> 'Error = Type 'DataViewRow' is not defined.
>
>
>
>
>
> Dim FileLink As HyperLink = e.Item, FindControl("FileHyperLink")
>
> 'Error = Value of type 'System.Web.UI.WebControls.DataGridItem' cannot be
> converted to 'System.Web.UI.WebControls.HyperLink'.
>
>
>
>
>
> Dim FileName As String = FileRow("Name")
>
>
>
> FileLink.NavigateUrl = String.Format("http://{0}/",
> DomainVariable, FileName)
>
> FileLink.Text = FileRow("Name")
>
> End If
>
>
>
> The rest of the code is doing fine. This is my first datagrid .......
>
>
>
> _____
>
> From: AspNetAnyQuestionIs <mailto:AspNetAnyQuestionIsOk%40yahoogroups.com>
Ok%40yahoogroups.com">Ok
yahoogroups.com
> [mailto:AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40yahoogroups.com> Ok%40yahoogroups.com">Ok
yahoogroups.com] On
Behalf Of Dean Fiala
> Sent: Wednesday, September 05, 2007 8:46 AM
> To: AspNetAnyQuestionIs <mailto:AspNetAnyQ