Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> An ajax tabcontrol in a InsertItemTemplate on formview bound to llblgendatatsource2
 

Pages: 1
LLBLGen Pro Runtime Framework
An ajax tabcontrol in a InsertItemTemplate on formview bound to llblgendatatsource2
Page:1/1 

  Print all messages in this thread  
Poster Message
like2175
User



Location:
Camberley, United Kingdom
Joined on:
27-Mar-2006 16:16:06
Posted:
83 posts
# Posted on: 27-Sep-2007 15:38:55.  
I have added an AjaxControlToolkit Tab control to the InsertItemTemplate of a Formview. Wthe "insert" button is pressed nothing is written to the database. I am doing something wrong?

Placing bound controls with the EditItemTemplate works fine.

llblgenpro 2.0
Oracle 9.2.0.7
VB.NET 2005
AjaxControlToolkit downloaded today.

Graham


Code:


<form id="form1" runat="server">
     <asp:ScriptManager ID="sm1" runat="server">
     </asp:ScriptManager>
    

        <llblgenpro:LLBLGenProDataSource ID="dsPerson" runat="server" DataContainerType="EntityCollection"
     EntityCollectionTypeName="Fluor.PAF.DAL.CollectionClasses.PersonCollection, Fluor.PAF.DAL" EnablePaging="True"
     >
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

         <asp:FormView ID="fvPerson" runat="server" DataKeyNames="PersonId" DataSourceID="dsPerson"
         AllowPaging="True" DefaultMode="Insert">
            <EditItemTemplate>
...
            </EditItemTemplate>
            <InsertItemTemplate>

             <cc1:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0">
                <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
                 <ContentTemplate>
                 PersonId
             <asp:Label ID="Label9" runat="server" Text='<%# Bind("PersonId") %>'></asp:Label><br />
        
                 First name<asp:TextBox CssClass="ValueField" ID="editFirstnameLabel" runat="server"
                    Text='<%# Bind("Firstname") %>'></asp:TextBox>
                     Last name<asp:TextBox CssClass="ValueField" ID="TextBox1" runat="server"
                    Text='<%# Bind("Lastname") %>'></asp:TextBox>
                 </ContentTemplate>
                </cc1:TabPanel>
             </cc1:TabContainer><br />
             <br />            

             <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Insert"
                     Text="Insert">
                    </asp:LinkButton>
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                     Text="Cancel">
                    </asp:LinkButton>
            </InsertItemTemplate>


The output window shows the following when I enable llblgen debugging
Code:
Method Enter: TransactionBase.CTor
:     Transaction name: SaveRecursively. Isolation level: ReadCommitted.
Method Exit: TransactionBase.CTor
Method Enter: EntityBase.Save(2)
Active Entity Description:
    Entity: Fluor.PAF.DAL.EntityClasses.PersonEntity. ObjectID: 6da2c6b8-7cd4-456d-90ea-ff51411809fa
    PrimaryKey field: PersonId. Type: System.Int32. Value: <undefined value>
Method Enter: ObjectGraphUtils.DetermineActionQueues(6)
Active Entity Description:
    Entity: Fluor.PAF.DAL.EntityClasses.PersonEntity. ObjectID: 6da2c6b8-7cd4-456d-90ea-ff51411809fa
    PrimaryKey field: PersonId. Type: System.Int32. Value: <undefined value>
Method Exit: ObjectGraphUtils.DetermineActionQueues(6)
Method Exit: EntityBase.Save(2): no entities to save.
Method Enter: TransactionBase.Commit
Method Enter: TransactionBase.Reset
Method Exit: TransactionBase.Reset
Method Exit: TransactionBase.Commit



PersonId is the PK for the table. If I remove the Ajax tab controls then a new record is created in the database.
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14569 posts
# Posted on: 27-Sep-2007 16:05:09.  
Please check the following link:
http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=8049
Apparently, the FormView can't find controls inside the TabContainer, to databind them.


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.