Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Wrapping Output Using Columns


Message #1 by "Adam Harris" <adam@w...> on Fri, 12 Apr 2002 05:39:25 -0400
Hey Guys,

I am using the below code to edit a member's information:

<form runat="server">

  <ASP:DataGrid id="MyDataGrid" runat="server"
       CellPadding = "2"
    HeaderStyle-HorizontalAlign="Center"
 HeaderStyle-BackColor="#FFFFFF"
       EditItemStyle-BackColor="yellow"
    ItemStyle-BackColor="yellow"
    AlternatingEditItemStyle-BackColor="#ffff99"
       DataKeyField="memberid"
       OnEditCommand="DoItemEdit"
       OnUpdateCommand="DoItemUpdate"
       OnCancelCommand="DoItemCancel"
       AutoGenerateColumns="False">

    <Columns>

      <ASP:BoundColumn DataField="memberid" HeaderText="Memberid"
ReadOnly="True" />
   <ASP:BoundColumn DataField="first_name" HeaderText="First Name" />
     <ASP:BoundColumn DataField="last_name" HeaderText="Last Name" />
  <ASP:BoundColumn DataField="password" HeaderText="Password" />
   <ASP:BoundColumn DataField="address1" HeaderText="Addr 1" />
    <ASP:BoundColumn DataField="address2" HeaderText="Addr 2" />
     <ASP:BoundColumn DataField="city" HeaderText="City" />
   <ASP:BoundColumn DataField="state" HeaderText="State" />
   <ASP:BoundColumn DataField="zip" HeaderText="Zip/Postal" />
    <ASP:BoundColumn DataField="country" HeaderText="Country" />
     <ASP:BoundColumn DataField="phone" HeaderText="Phone" />
   <ASP:BoundColumn DataField="email" HeaderText="Email" />
      <ASP:EditCommandColumn
           EditText="Edit"
           CancelText="Cancel"
           UpdateText="Update" />

    </Columns>

  </ASP:DataGrid>

</form>

As you can see, that's a lot of columns for one row.  My question is, how do
I tell the datagrid to put half of these columns on another row?  Thanks!

Adam Harris



  Return to Index