RadPanelBar within Formview

8 posts, 0 answers
  1. Jun
    Jun avatar
    47 posts
    Member since:
    Sep 2006

    Posted 08 Sep 2009 Link to this post

    I am looking for an example where the the radpanelbar items contain bindable controls from the datasource specified within a formview. I made the following layout but binding would not work. The bindable  column1 (in bold) below is not populated. Any better approach in handling a bindable data entry form within a radpanelitem? Please help.

    <formview id="test" runat="server" datasource="onesource">  
     <telerik:RadPanelItem Text="1st bar" Expanded="true" > 
            <telerik:RadPanelItem Value="clInfo" > 
                 <asp:TextBox id="txt1st" runat="server" Text'<%# Bind("Column1") %>' 

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Sep 2009 Link to this post


    You can bind the textbox using the Eval method as shown below:
     <telerik:RadPanelItem Value="clInfo" runat="server"
                  <asp:TextBox ID="txt1st" runat="server" Text='<%#DataBinder.Eval(FormView1.DataItem,"Column1")%>'></asp:TextBox> 

  3. Jun
    Jun avatar
    47 posts
    Member since:
    Sep 2006

    Posted 09 Sep 2009 Link to this post


    It worked. Thanks a lot. Do you have an explanation on why Bind would not work? If you don't have  a time to answer this, that is fine. I really appreciate your prompt response.

  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Sep 2009 Link to this post

    Hi Jun,

    Go through the following article which gives an overview of Data-Binding Expressions.
    Data-Binding Expressions Overview

    Here is an asp.net forum which explains the difference between DataBinder.Eval and Eval.
    DataBinder.Eval vs Eval

  5. Dan Pettersson
    Dan Pettersson avatar
    20 posts
    Member since:
    Sep 2009

    Posted 12 Mar 2010 Link to this post

    I managed to databind using this technique, however, when listening to the ItemUpdating-event of the formview, e.OldValues and e.NewValues are empty. What should I do?
    My FormView is bound to an ObjectDataSource, so they should be populated.

  6. Kalpana
    Kalpana avatar
    2 posts
    Member since:
    Aug 2012

    Posted 09 Aug 2012 Link to this post

    Hi Dan,
    Iam facing the same issue what you got.Any luck?
    What is the solution for this?

    Telerik team,can you guys help me on this?

  7. Greg
    Greg avatar
    36 posts
    Member since:
    Oct 2007

    Posted 08 Mar 2014 in reply to Princy Link to this post

    Using Eval does not provide two-way binding so your solution is not correct as a replacement for Bind("someProperty"). How do we get back two-way binding in a PanelBarItem inside an EditItemTemplate?
  8. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 12 Mar 2014 Link to this post


    In this case the only workaround would be to implement two-way binding functionality manually. When user updates the data you can access the RadPanelBar control withing the form view and retrieve its text box values  and update the data source manually.

    Boyan Dimitrov

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top