How to set DataNavigateUrlFormatString with radopen javascript at run time?

3 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 28 Jan 2011 Link to this post

    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. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 31 Jan 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 31 Jan 2011 Link to this post

    Radoslav,
    It works. Thanks for your help!

    Jessie
Back to Top