Rad Controls with dundas chart

6 posts, 0 answers
  1. sanjeeb
    sanjeeb avatar
    6 posts
    Member since:
    Feb 2009

    Posted 09 Feb 2009 Link to this post

    My program will have two tabs.One tab(pageview) will display dundas chart.when user clicks on a chart, same chart will be created in another tab(pageview).How to do this??? 
  2. sanjeeb
    sanjeeb avatar
    6 posts
    Member since:
    Feb 2009

    Posted 10 Feb 2009 Link to this post

    It will be OK if you guide me how to add text box in a pageview through .cs file.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 10 Feb 2009 Link to this post

    Hey Sanjeeb,

    Check out the following link, defines copying controls in a manner like you need:

    http://forums.asp.net/t/617980.aspx

    Can't guarantee it working on your chart, but it is the best answer I found (and copies regular textboxes over), just be sure when you are adding to the second multi page's controls collection, you cast the returned object as a Control.  I did something like this:

        protected void Button1_Click(object sender, EventArgs e)  
        {  
            ControlCollection newCollection = multipage1.Controls;  
            foreach (Object control in newCollection)  
            {  
                multipage2.Controls.Add((Control)CloneControls(control));  
            }         
        } 

    Cheers!
  5. sanjeeb
    sanjeeb avatar
    6 posts
    Member since:
    Feb 2009

    Posted 12 Feb 2009 Link to this post

    Hi Serrin,

                      Thank you for your help.But the code and link you provided me is not the exact answer to my question.Forget my first question(regarding dundas chart), just try to answer my second question.If i get the answer to  the second question(regarding adding text box) i will be able to solve the first one.I am no getting what is problem with below code:

                RadTabStrip radTabStrip = new RadTabStrip();
                RadMultiPage RadMultiPage1 = new RadMultiPage();
               
                PageView pv1 = new PageView();
                PageView pv2 = new PageView();
                TextBox tb1 = new TextBox();
                tb1.ID = "tb1";

                pv1.ID = "pv1";
                pv2.ID = "pv2";
              
                Tab t1 = new Tab();
                t1.ID = "t1";
                t1.Text = "Average";
                t1.PageViewID = "pv1";

                Tab t2 = new Tab();
                t2.ID = "t2";
                t2.Text = "Details";
                t2.PageViewID = "pv2";

             
                       
                pv1.Controls.Add(tb1);    /////  this does not work
                
                radTabStrip.Tabs.Add(t1);
                radTabStrip.Tabs.Add(t2);

                RadMultiPage1.ID = "RadMultiPage1";
                RadMultiPage1.PageViews.Add(pv1);
                RadMultiPage1.PageViews.Add(pv2);
                pv1.Selected = true;
                pv1.TabIndex =0;

               radTabStrip.MultiPageID = "RadMultiPage1";
               this.Controls.Add(radTabStrip);
              this.Controls.Add(RadMultiPage1);

              
    Though i have solved this problem.I have created radtabstrip,multipage,pageview  statically and then through code behind i have added controls.


                           
  6. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 12 Feb 2009 Link to this post

    Hi sanjeeb,

    Here's your modified code snippet that works as expected.

    RadTabStrip radTabStrip = new RadTabStrip(); 
    RadMultiPage RadMultiPage1 = new RadMultiPage(); 
     
    RadPageView pv1 = new RadPageView(); 
    RadPageView pv2 = new RadPageView(); 
    TextBox tb1 = new TextBox(); 
    tb1.ID = "tb1"
     
    pv1.ID = "pv1"
    pv2.ID = "pv2"
     
    RadTab t1 = new RadTab(); 
    t1.Text = "Average"
    t1.PageViewID = "pv1"
     
    RadTab t2 = new RadTab(); 
    t2.Text = "Details"
    t2.PageViewID = "pv2"
     
    pv1.Controls.Add(tb1); 
     
    radTabStrip.Tabs.Add(t1); 
    radTabStrip.Tabs.Add(t2); 
     
    RadMultiPage1.ID = "RadMultiPage1"
    RadMultiPage1.PageViews.Add(pv1); 
    RadMultiPage1.PageViews.Add(pv2); 
    pv1.Selected = true
    pv1.TabIndex = 0; 
     
    radTabStrip.MultiPageID = "RadMultiPage1"
    form1.Controls.Add(radTabStrip); 
    form1.Controls.Add(RadMultiPage1); 


    Sincerely yours,
    Paul
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. sanjeeb
    sanjeeb avatar
    6 posts
    Member since:
    Feb 2009

    Posted 12 Feb 2009 Link to this post

    Thank you Paul, Now i got the answer!!!!!!!!!!!!!!1


Back to Top
UI for ASP.NET Ajax is Ready for VS 2017