This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Filtering on Hyperlink Column

2 Answers 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Cooney
Top achievements
Rank 1
John Cooney asked on 06 Mar 2010, 02:56 PM

 

I have a grid which runs off a stored procedure and works fine.

I implemented filtering, which worked fine.

I then converted one of the columns I'm filtering on from GridBoundColumn

 

<telerik:GridBoundColumn DataField="plaintiff" HeaderText="Plaintiff" SortExpression="plaintiff" UniqueName="plaintiff" ReadOnly="True">  
</telerik:GridBoundColumn> 

 

 

 

 

 

 

to a GridHyperLinkColumn

 

 

<telerik:GridHyperLinkColumn DataTextFormatString="{0}" DataNavigateUrlFields="id_tblmaster" UniqueName="Plaintiff1" DataNavigateUrlFormatString="showtags1.aspx?cs={0}" HeaderText="Plaintiff" 
 DataTextField="Plaintiff" SortExpression="plaintiff">  
</telerik:GridHyperLinkColumn> 

 

 

 

 

The hyperlink works fine and does what I wish and the DataNavigateUrlFields I am using here is in fact a GUID.

I find however that I now get an error filtering on this hyperlink style column.  The filter functionality seems to be trying to filter using the DataNavigateUrl value instead of the DataTextField value.  I do not see where I have a property to set which value the filter should evaluate.

It seems to me that the filtering function should look at the DataTextField value in the case of a GridHyperLinkColumn.

Any help greatly appeciated.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Mar 2010, 08:13 AM
Hi,

Please try  setting the DataType of the GridHyperLinkColumn to string as shown below:
ASPX:
   <telerik:GridHyperLinkColumn DataType="System.String" DataTextField="ProductName" DataNavigateUrlFields="ProductID" 
DataNavigateUrlFormatString="~/Default4.aspx?key={0}"
   </telerik:GridHyperLinkColumn> 

Also  take a look at the forum link below which discusses on a similar issue:


Hope this helps.

Thanks,
Princy
0
John Cooney
Top achievements
Rank 1
answered on 08 Mar 2010, 11:19 AM
Thanks!!

Works great.
Tags
Grid
Asked by
John Cooney
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John Cooney
Top achievements
Rank 1
Share this question
or