I have created an inline editable grid, and i am having one of my column as GridHyperlink column. I want that column also to be editable. But alll others columns are coming as editable on double click of the row but the hyperlink column is coming as read only. Please help.
Thanks in advance,
Vinita
Thanks in advance,
Vinita
10 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 11 Feb 2009, 01:40 PM
Hello Vinita,
You can use a TemplateColumn rather than a HyperlinkColumn with a HyperLink in its ItemTemplate and a TextBox in its EditItemTemplate as shown below:
aspx:
Thanks
Princy.
You can use a TemplateColumn rather than a HyperlinkColumn with a HyperLink in its ItemTemplate and a TextBox in its EditItemTemplate as shown below:
aspx:
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:HyperLink runat="server" ID="HyperLink1" Text='<%# Eval("Quantity") %>'> |
| </asp:HyperLink> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:TextBox runat="server" ID="Textbox1" Text='<%# Bind("Quantity") %>'> |
| </asp:TextBox> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
Thanks
Princy.
0
Vinita
Top achievements
Rank 1
answered on 12 Feb 2009, 11:45 AM
I tried this, the value in the column was not coming as hyperlink.
my code is:
Is there any problem in this peice of code?
Do i have to place some code in the code behind i.e. c# file?
Thanks in advance,
Vinita
my code is:
| <telerik:GridTemplateColumn DataField="ows_Title" HeaderText="Job Requisition Title"> |
| <ItemTemplate> |
| <asp:HyperLink runat="server" ID="HyperLink1" Text='<%# Eval("ows_Title") %>'> |
| </asp:HyperLink> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:TextBox runat="server" ID="Textbox1" Text='<%# Bind("ows_Title") %>'> |
| </asp:TextBox> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
Is there any problem in this peice of code?
Do i have to place some code in the code behind i.e. c# file?
Thanks in advance,
Vinita
0
Princy
Top achievements
Rank 2
answered on 13 Feb 2009, 04:34 AM
Hello Vinita,
Set the NavigateUrl property to show the value as a hyperlink. Try the ASPX and check whether it works.
ASPX:
Thanks,
Princy.
Set the NavigateUrl property to show the value as a hyperlink. Try the ASPX and check whether it works.
ASPX:
| <ItemTemplate> |
| <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# Eval("ows_Title") %>' Text='<%# Bind("ows_Title") %>'> |
| </asp:HyperLink> |
| </ItemTemplate> |
Thanks,
Princy.
0
Vinita
Top achievements
Rank 1
answered on 16 Feb 2009, 08:38 AM
Hi Princy,
I tried placing NavigateURL attribute also but no luck.
Thanks,
Vinita
I tried placing NavigateURL attribute also but no luck.
Thanks,
Vinita
0
Brian
Top achievements
Rank 1
answered on 02 Mar 2009, 03:14 PM
I too am having a similar problem with the hyperlink column in the radgrid. I assign a value to the text property and the navigateURL property and when i run my project, it does not display as a hyperlink.
Any help on this issue would be greatly appreciated.
Any help on this issue would be greatly appreciated.
0
Hello Brian,
I created a sample project, illustrating how to implement the approach suggested by Princy.
Test it at your side and let us know whether it helps.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I created a sample project, illustrating how to implement the approach suggested by Princy.
Test it at your side and let us know whether it helps.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brian
Top achievements
Rank 1
answered on 02 Mar 2009, 03:48 PM
So are you saying that using the following doesn't work:
<telerik:GridHyperLinkColumn DataTextField="Name" UniqueName="Name" NavigateUrl="http://www.google.com" Target="Google" >
</telerik:GridHyperLinkColumn>
The approach you described I've used before, however, in the project I am working on right now, I have to be able to use client-side binding.
Brian
0
Hello Brian,
Try the following modification:
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Try the following modification:
| <telerik:GridHyperLinkColumn |
| DataTextField="Name" |
| UniqueName="Name" |
| DataNavigateUrlFormatString="http://www.google.com" |
| DataNavigateUrlFields="Name" |
| Target="_blank" > |
| </telerik:GridHyperLinkColumn> |
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kyle Woodtke
Top achievements
Rank 1
answered on 31 Mar 2009, 08:15 PM
I am having a similar problem and Target="_blank" works. Is there any way to do this without opening a new window? In my case I can't move away from the page with the grid, whether it is using a Response.Redirect or a <telerik:GridHyperLinkColumn> and an actual link similar to the example above.
Thanks.
Thanks.
0
Hello Kyle,
You just need to modify target="_blank" to target="_self":
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
You just need to modify target="_blank" to target="_self":
| <telerik:GridHyperLinkColumn |
| DataTextField="Name" |
| UniqueName="Name" |
| DataNavigateUrlFormatString="http://www.google.com" |
| DataNavigateUrlFields="Name" |
| Target="_self" > |
| </telerik:GridHyperLinkColumn> |
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.