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

RadTabStrip and Databinding

4 Answers 128 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 2
Olivier asked on 05 Nov 2012, 08:01 AM
Hello,

I use on .net Two FrameWork Telerik and Strataframe.

Strataframe can to interact with the sqlserver like entity but it's better.
For Example I can binding textbox with my Business Object Like this.

<SFWeb:TextBox runat="server" ID="Txt1" BindingField="MyField"  BusinessObjectName="TableBo" ></SFWeb:TextBox>

it's work on WebForm , on WebUserControl add on the WebForm,
and if i use the RadTabStrip , it's work in RadPageView so

But if i work with the PageViewCreated to load WebUserControl my Textbox doesn't load
the field on my Business Object. What 's the difference between PageViewCreated and load in the Webform ?

have you some code to fix it ?

It's important to use Strataframe cause it can to Bind in to Way,

With the simple syntax : this.TableBo.Save()  , i save in sql table without to reload the Value of the textbox.


Thanks For your help

Olivier,

4 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 08 Nov 2012, 08:43 AM
Hi Oliver,

Could you elaborate a bit more about your scenario? Do you create dynamically the RadTabs and the RadPageViews controls? In addition, if you could provide us the implementation that you use at your end, it would be very helpful.


All the best,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Olivier
Top achievements
Rank 2
answered on 08 Nov 2012, 02:19 PM
Hello Nencho

I make a sample but if you don't have Strataframe you don't test it.

My textbox PlaTextBox inherit of telerik RadTexBox

My sample is here  Click here

I create the radtab and radpageView dynamically and i load ascx WebUserControl.

  private void AddTab(string tabName)
        {
            RadTab tab = new RadTab();
            tab.Text = tabName;
            RadTabStrip1.Tabs.Add(tab);

            RadPageView pageView = new RadPageView();
            pageView.ID = tabName;
            RadMultiPage1.PageViews.Add(pageView);
        }


        protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            string userControlName = e.PageView.ID + "CS.ascx";
    
            Control userControl = Page.LoadControl(userControlName);
            userControl.ID = e.PageView.ID + "_userControl";
    
            e.PageView.Controls.Add(userControl);

            this.RadTabStrip1.DataBind();
        }

ps : how we can attach files to zip format ?

Olivier,
0
Nencho
Telerik team
answered on 13 Nov 2012, 03:24 PM
Hello Oliver,

As I can see, you attempt to bind the newly added UserControl, by invoking the DataBind() method on the RadTabStrip control. I can suggest you to use the method on the RadMultiPage control, since RadTabStrip databind will not invoke the RadMultiPage databind. If this does not help, I would like to ask you to clarify if there is any requirement for binding objects, which inherit the StrataFrame framework, after the Page_Load event.

Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Olivier
Top achievements
Rank 2
answered on 15 Nov 2012, 05:46 PM
Thanks Nencho,

You had a good idea for the binding on the radmultipage but it's doesn't work.

You are right for the binding objects with strataframe, they bind on the Page_PreRender

i wait their version 2.0, we ll can to bind any control telerik when i want,

and i will see if the community can start the BindControls method on the demand

Thanks
Olivier,
Tags
TabStrip
Asked by
Olivier
Top achievements
Rank 2
Answers by
Nencho
Telerik team
Olivier
Top achievements
Rank 2
Share this question
or