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

Dynamically Add Tab, PageView, Window

2 Answers 163 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Curt
Top achievements
Rank 1
Curt asked on 12 Aug 2011, 11:48 PM
Hello,

I am trying to create a way to display some pdf document that are location on a remote drive connected to our server. This seems like a difficult problem (and Im pretty new). What I have done so far is 1- Read files from specified folder, 2- Create Tab & Pageview for each pdf file. 3 - Read/Write the file to aspx page adding query sting to request specified pdf, 4- Create RadWindow for each pdf add to pageview. It seems like things are starting to work except that in every tab it displays every pdf instead of just displaying a single pdf per tab.

Ive posted my code here [removed by Admin for containing dev version of the Telerik controls].

Any help would be great, I really only know enough to really break things

~Curt

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 18 Aug 2011, 02:57 PM
Hello Curt,

Actually, there is a newly introduced property - ContentUrl which is ideal for this type of scenario. Please, try modifying your code like this.
protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
  {
      //RadWindow window = new RadWindow();
      //window.EnableEmbeddedSkins = false;
      //window.ShowContentDuringLoad = true;
      //window.VisibleStatusbar = false;
      //window.Behaviors = WindowBehaviors.Reload | WindowBehaviors.Close | WindowBehaviors.Move;
      //window.Width = Unit.Parse("1000px");
      //window.Height = Unit.Parse("300px");
      //this.Controls.Add(window);
      //window.VisibleOnPageLoad = true;
      //window.NavigateUrl = @"~/BinaryData.aspx?File=" + FileName;
      //window.Style["z-index"] = "0";
      //window.ID = FileName;
 
      e.PageView.ContentUrl = @"~/BinaryData.aspx?File=" + FileName;
     
  }

You can test the ContentUrl property in this demo -
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/multipage/defaultcs.aspx

The ContentUrl is set for the page view for the 'LinkedIn Profile' tab.

Kind regards,
Peter
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
Curt
Top achievements
Rank 1
answered on 18 Aug 2011, 04:05 PM
Hell ya Peter! Just what I needed.

Thank you!
Curt
Tags
TabStrip
Asked by
Curt
Top achievements
Rank 1
Answers by
Peter
Telerik team
Curt
Top achievements
Rank 1
Share this question
or