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

DataNavigateUrlFormatString - not navigating

4 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
King Wilder
Top achievements
Rank 2
King Wilder asked on 25 Jun 2008, 09:32 PM
I'm trying to have a HyperLink column in my grid where it links to another page in my web site application, but the link is not active.  What am I doing wrong?

        <rad:GridHyperLinkColumn AllowFiltering="False"  
            DataNavigateUrlField="AppraisalID" ShowSortIcon="False" Text="View"  
            UniqueName="column"  
            DataNavigateUrlFormatString="~/Appraisals/Details.aspx?id={0}"
        </rad:GridHyperLinkColumn> 
 

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Jun 2008, 06:24 AM
Hi,

Try setting the NavigateUrl property of the HyperLinkColumn as shown in the code snippet below.

ASPX:
<rad:GridHyperLinkColumn UniqueName="Hyper" DataTextField="Grid"  NavigateUrl="DataGrid.aspx" HeaderText="Grid Details"
</rad:GridHyperLinkColumn> 
 
Thanks
Princy.
0
King Wilder
Top achievements
Rank 2
answered on 26 Jun 2008, 03:14 PM
Princy,

The page I want to redirect to is NOT in the same folder.  This is similar to the structure of my site.

/root/destination_folder/default.aspx
/root/Controls/myUserControl.ascx
/root/source_folder_with_UserControl/default.aspx

I have a page in the source folder with a UserControl that has the RadGrid, and when the link in the grid is clicked, I need to go to the destination folder/default.aspx page.  That's why I used the ~/Appraisals/default.aspx path.

I have been able to link to pages inside the current folder, but not to pages outside the current folder.

Shouldn't this work?  Please tell me how this is done.

Thanks,

King
0
Dimo
Telerik team
answered on 27 Jun 2008, 09:12 AM
Hello King,

The code that you have pasted is OK. The problem should be somewhere else (Javascript errors, some client-side validation?)

Feel free to send us a simple working project, which reproduces the problem and we will readily investigate.


All the best,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
King Wilder
Top achievements
Rank 2
answered on 27 Jun 2008, 04:00 PM
My bad.  I'm really sorry for taking up bandwidth on this, but I wasn't returning the AppraisalID in the result set.  It works now.

King
Tags
Grid
Asked by
King Wilder
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
King Wilder
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or