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

Exporting a GridViewDynamicHyperlink Column

2 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lisa
Top achievements
Rank 1
Lisa asked on 06 May 2011, 03:23 PM
Hi - I'm creating my first GridView, and have a question.  I have a column defined as a DynamicHyperlink, and it's working well as far as the link going where I want it to.  However, when I try to export the file, I'm getting this value in the field, it should be a name:

"WEDSSGVStuPerf.ServiceReference1.StudentPrefBev"

I have the field defined as below:

 

 

 

<telerik:GridViewDynamicHyperlinkColumn SortMemberPath="LastName" Header="Student Name" NavigateUrlFormatString="http://localhost:63277/StudentProfileMUTestPage.aspx"

NavigateUrlMemberPaths="FirstName,LastName" TargetName ="_self" >  

<telerik:GridViewDynamicHyperlinkColumn.CellTemplate>

 

 

<DataTemplate>

 

<TextBlock Text="{Binding spbStudentName}" TextWrapping="Wrap" />

 

 

</DataTemplate>

 

 

 

</telerik:GridViewDynamicHyperlinkColumn.CellTemplate>

 

 

</telerik:GridViewDynamicHyperlinkColumn>

 

 


What do I need to do to get this to export correctly?

Thank you
Lisa

2 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 09 May 2011, 01:40 PM
Hello Lisa,

I created a sample project for you (utilizing our latest binaries), but unfortunately I couldn't reproduce such an issue. Would you please send us a simple demo project to help us provide you better support for your case. Meanwhile, you may check my example and see if there are any differences between your approach and mine. Please, excuse me for the inconvenience. 

All the best,
Ivan Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lisa
Top achievements
Rank 1
answered on 09 May 2011, 03:50 PM
Thank you Ivan.  Having a working example helped me understand how this works better.

I did find my problem.  I had the following on the column definition.

DataMemberBinding="{Binding}"

 


I needed to have this: (so that it knew which field to get the value from!)

DataMemberBinding="{Binding spbStudentName}"

 

Tags
GridView
Asked by
Lisa
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Lisa
Top achievements
Rank 1
Share this question
or