Thursday, February 17, 2011

Auto-Generate Binded Columns/Fields for a DetailsView

In Visual Studio I have set up a DetailsView and an ObjectDataSource which connects with my BLL.

<asp:DetailsView runat="server" ID="UserProfileview" DataSourceID="UserData" AutoGenerateRows="False">

<asp:ObjectDataSource ID="UserData" runat="server" TypeName="UoM.Business.Core.UserAccount" SelectMethod="Read">
<SelectParameters>
    <asp:QueryStringParameter QueryStringField="id" Direction="input" Type="Int32" Name="Id" DefaultValue="" />
</SelectParameters>

I am not sure how so Visual Studio can automatically show me all the columns/fields so I can start modifying it instead of typing in each column manually.

Any ideas?

From stackoverflow
  • If you set AutoGenerateRows="False" then the tags for your bound columns have to be added manually.

0 comments:

Post a Comment