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

How to set DataNavigateUrlFormatString with radopen javascript at run time?

3 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 25 Jan 2011, 09:26 PM
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!

3 Answers, 1 is accepted

Sort by
0
JJ
Top achievements
Rank 1
answered on 29 Jan 2011, 02:12 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!

0
Radoslav
Telerik team
answered on 31 Jan 2011, 09:59 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;
      }


Greetings,
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, 09:00 PM
Radoslav,
It works. Thanks for your help!

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