Subversion-Projekte lars-tiefland.prado

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<com:TContent ID="body">

<h1>TDataGrid Sample 3</h1>
<h2>Interacting with TDataGrid</h2>

<com:TDataGrid
        Width="800px"
        CellPadding="2"
        ID="DataGrid"
        DataKeyField="ISBN"
        AutoGenerateColumns="false"
        HeaderStyle.BackColor="black"
        HeaderStyle.ForeColor="white"
        ItemStyle.BackColor="#BFCFFF"
        ItemStyle.Font.Italic="true"
        AlternatingItemStyle.BackColor="#E6ECFF"
        EditItemStyle.BackColor="lightyellow"
        OnItemCreated="itemCreated"
        OnEditCommand="editItem"
        OnUpdateCommand="saveItem"
        OnCancelCommand="cancelItem"
        OnDeleteCommand="deleteItem"
        >

        <com:TBoundColumn
                ID="BookTitleColumn"
                HeaderText="Book Title"
                HeaderStyle.Width="400px"
                DataField="title"
                />
        <com:TBoundColumn
                ID="PublisherColumn"
                HeaderText="Publisher"
                HeaderStyle.Width="150px"
                DataField="publisher"
                />
        <com:TBoundColumn
                ID="PriceColumn"
                ItemStyle.HorizontalAlign="Right"
                ItemStyle.Wrap="false"
                ItemStyle.Font.Italic="false"
                ItemStyle.ForeColor="green"
                HeaderText="Price"
                HeaderStyle.Width="70px"
                DataField="price"
                DataFormatString="$%.2f"
                />
        <com:TCheckBoxColumn
                ID="InStockColumn"
                HeaderText="In-stock"
                DataField="instock"
                />
        <com:TDropDownListColumn 
                ID="RatingColumn"
                HeaderText="Rating"
                DataTextField="rating"
                >
                <prop:DataTextFormatString><img src="images/star%s.gif" alt="" /></prop:DataTextFormatString>
                <com:TListItem Value="1" />
                <com:TListItem Value="2" />
                <com:TListItem Value="3" />
                <com:TListItem Value="4" />
                <com:TListItem Value="5" />
        </com:TDropDownListColumn>
        <com:TEditCommandColumn
                HeaderText="Edit"
                HeaderStyle.Width="100px"
                UpdateText="Save"
                ItemStyle.HorizontalAlign="Center"
                ItemStyle.Font.Italic="false"
                />
        <com:TButtonColumn
                ID="DeleteColumn"
                HeaderText="Delete"
                HeaderStyle.Width="50px"
                ItemStyle.HorizontalAlign="Center"
                ItemStyle.Font.Italic="false"
                Text="Delete"
                CommandName="delete"
                />
</com:TDataGrid>

<div class="last-modified">$Id: Sample3.page 1650 2007-01-24 06:55:32Z wei $</div></com:TContent>