Hi! I'm getting a SQL Exception error (invalid column name) when trying to filter on a GridHyperLinkColumn. What I'm trying to do is show the name of a person in the column with a hyperlink to the person's email address.
Here's the code from the aspx page:
The stored procedure which populates the radgrid does pull back column names "Name" and "Email1". The radgrid appears to display correctly in that I do see the names of people and if I click on one of the names my mail client does open up an email window with the person's name in the "To:" field.
However, when I attempt to filter on the column I receive the following error (regardless of whether I type in a person's name or email address:
Is it possible to do this type of functionality GridHyperLink column where the data displayed comes from one column in a database table but the hyperlink ability uses another column in the database?
Thanks!
Here's the code from the aspx page:
<
telerik:GridHyperLinkColumn
DataNavigateUrlFields
=
"Email1"
UniqueName
=
"Email1"
DataNavigateUrlFormatString
=
"mailto:{0}"
DataTextField
=
"Name"
HeaderText
=
"Reviewer"
SortExpression
=
"Email1"
ShowFilterIcon
=
"false"
ShowSortIcon
=
"false"
AutoPostBackOnFilter
=
"true"
/>
The stored procedure which populates the radgrid does pull back column names "Name" and "Email1". The radgrid appears to display correctly in that I do see the names of people and if I click on one of the names my mail client does open up an email window with the person's name in the "To:" field.
However, when I attempt to filter on the column I receive the following error (regardless of whether I type in a person's name or email address:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException: Invalid column name 'Name'.
Is it possible to do this type of functionality GridHyperLink column where the data displayed comes from one column in a database table but the hyperlink ability uses another column in the database?
Thanks!