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

How to set DataNavigateUrlFormatString with radopen javascript at run time?

2 Answers 149 Views
Window
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 29 Jan 2011, 02:13 AM
How to set DataNavigateUrlFormatString with radopen javascript at run time?

I used the following code on page load, it doesn't work while uisng

glc.DataNavigateUrlFormatString = "javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

---------------------------------------------------------------------

 

if (!Page.IsPostBack)

 

{

 

 

 

GridHyperLinkColumn glc;

 

glc =

new GridHyperLinkColumn();

 

 

this.rgTranslationView.MasterTableView.Columns.Add(glc);

 

glc.DataTextField=

"English";

 

glc.HeaderText=

"English";

 

glc.UniqueName =

"English0";

 

glc.FilterControlWidth=

Unit.Pixel(100);

 

glc.DataType= System.

Type.GetType("System.String");

 

glc.AutoPostBackOnFilter=

true;

 

glc.AllowFiltering =

true;

 

glc.ShowFilterIcon =

false;

 

glc.DataNavigateUrlFormatString =

"javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";

 

glc.DataNavigateUrlFields =

new String[] { "TagID, LanguageID" };

 

glc.CurrentFilterFunction =

GridKnownFunction.Contains; 

 

 

}


Can anyone help?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 31 Jan 2011, 10:01 AM
Hello Jessie,

Could you please try changing the posted code as following and let me know if the issue still exists:
if (!Page.IsPostBack)
        {
            GridHyperLinkColumn glc;
            glc = new GridHyperLinkColumn();
            this.rgTranslationView.MasterTableView.Columns.Add(glc);
            glc.DataTextField = "English";
            glc.HeaderText = "English";
            glc.UniqueName = "English0";
            glc.FilterControlWidth = Unit.Pixel(100);
            glc.DataType = System.Type.GetType("System.String");
            glc.AutoPostBackOnFilter = true;
            glc.AllowFiltering = true;
            glc.ShowFilterIcon = false;
            glc.DataNavigateUrlFormatString = "javascript:function anon(){{window.radopen('View.aspx?TID={0}&LID={1}','View');}};anon();";
            glc.DataNavigateUrlFields = new String[] { "TagID", "LanguageID" };
            glc.CurrentFilterFunction = GridKnownFunction.Contains;
      }

Kind regards,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
JJ
Top achievements
Rank 1
answered on 31 Jan 2011, 08:59 PM
Radoslav,
It works. Thanks for your help!

Jessie
Tags
Window
Asked by
JJ
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
JJ
Top achievements
Rank 1
Share this question
or