shlvy Posted August 27, 2004 Posted August 27, 2004 Hi I use DataGrid and columns to display details and update them, the problem is that i want that the details will be shown in column, i mean one under one : UserName---> Password----> RetypePassword----> ..... And can i hide the Id number in the table, i don't need it to be shown. <columns> <asp:TemplateColumn HeaderText="ID"> <ItemTemplate> <asp:Label id="Name" runat="server" Text='<%# Container.DataItem("UserID") %>' /> </ItemTemplate> </asp:TemplateColumn> <asp:BoundColumn HeaderText="UserName" DataField="UserName" /> <asp:BoundColumn HeaderText="Password" DataField="Password" /> <asp:BoundColumn HeaderText="RetypePassword" DataField="RetypePassword" /> <asp:BoundColumn HeaderText="Email" DataField="Email" /> <asp:BoundColumn HeaderText="Comments" DataField="Comments" /> <asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" HeaderText="Edit" /> <asp:ButtonColumn HeaderText="" text="Delete" CommandName="delete" /> </columns> Thank's. Quote
eramgarden Posted August 27, 2004 Posted August 27, 2004 I think u need to build it like table,hr,td to change the look. And you can hide the ID. After you bind the data and datagrid, use onItemDataBound of datagrid and hide the columns u dont need.. this is a good site: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.