CodeSmith Community
Your Code. Your Way. Faster!

Wizard and DataSourceControl Problems

Latest post 05-06-2007 2:22 PM by rduque. 2 replies.
  • 04-02-2007 5:57 PM

    • basolutions
    • Top 100 Contributor
    • Joined on 03-21-2007
    • Denver, CO
    • Posts 51
    • Points 1,175

    Wizard and DataSourceControl Problems

    I have searched for any related posts and I have noticed that there have been a few unresolved posts that are similar.  I think I might be able to provide a few more details on the problems with using datasourcecontrols with a wizard.  I think this is definitely a bug.  I am new to netTiers, so I am just learning and not experienced enough to tackle this on my own.  I am using the latest nightly build 3/28/2007.

     If I put this simple grid with search on a page, it works perfectly:

    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="gvAccounts"></data:GridViewSearchPanel>
    <data:EntityGridView ID="gvAccounts" runat="server" AllowExportToExcel="False" AllowMultiColumnSorting="False"
    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="MxlAccountId" DataSourceID="AccountDataSource1"
    DefaultSortColumnName="MxlAccountId" DefaultSortDirection="Ascending" >
    <Columns>
    <asp:BoundField DataField="MxlAccountId" HeaderText="MxlAccountId" InsertVisible="False"
    ReadOnly="True" SortExpression="MxlAccountId" Visible="False" />
    <asp:ButtonField CommandName="Select" DataTextField="AccountName" HeaderText="Associated Account Name"
    SortExpression="AccountName" />
    </Columns>
    </data:EntityGridView>
    <data:AccountsDataSource ID="AccountDataSource1" runat="server" EnablePaging="True" EnableSorting="True" SelectMethod="GetPaged">
    </data:AccountsDataSource>

    If I put this same code in a wizard, I get this error:

    AccountDataSource1:Cannot create an object of type 'XXXXX.IEntityProvider` (clipped for brevity) from its string representation '' for the 'Provider' property. 

    This only happens when I add the AccountsDataSource to a web page that has a wizard control on it.  If I remove the wizard code, I no longer get the error.  It appears that the Provider property is unable to read the config to get the provider information. 

    Also, if I drop a user control into the wizard, the AccountsDataSource automatically adds all of the public properties to itself with default values.  The GridViewSearchControl does the same thing.  This is very annoying.  Again, only happens on a page with a wizard.  I was going to just manually bind the gridview but then the GridViewDataSource blows up.  Hopefully someone has some ideas on this.

    Thanks!

    • Post Points: 35
  • 05-05-2007 10:51 AM In reply to

    • Dmmmm
    • Not Ranked
    • Joined on 05-05-2007
    • Posts 1
    • Points 35

    Re: Wizard and DataSourceControl Problems

    I experience the same problem. I ended up creating a UserControl that contained the grid and datasource and then included that user control in the Wizard step.

     Hope this helps.

    • Post Points: 35
  • 05-06-2007 2:22 PM In reply to

    • rduque
    • Top 50 Contributor
    • Joined on 03-08-2007
    • Bogotá, Colombia
    • Posts 68
    • Points 1,865

    Re: Wizard and DataSourceControl Problems

    What you mean with "wizard"?
    Is a NETTIERS or VS2005 element?
    Where can I find it?

    Thanks,

    RAUL DUQUE
    Bogotá, Colombia

    RAUL DUQUE Bogotá, Colombia
    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems