asp.net - ObjectDataSource and Collection of Objects -
i have gridview bind objectdatasource. have readonlycollection of business objects have many properties. need display 4 of these properties in gridview. haven't used objectdatasource control before, how can use display 4 properties of of business objects in readonlycollection?
say had list of objects 2 properties: name & age:
<asp:gridview id="gvwexample" runat="server" autogeneratecolumns="false" datasourceid="myobjectdatasource"> <columns> <asp:boundfield datafield="name" headertext="name" /> <asp:boundfield datafield="age" headertext="age" /> </columns> </asp:gridview>
same thing if data binding against source , didn't want every value of each row of data.
Comments
Post a Comment