如何在Logi XML中编写表? 我从:
开始<PanelContent Height="1000">
<DataTable ID="tblPreview" Width="1000" ResizableColumns="True">
<DataTableColumn ID="colLabel" Header="Label" />
<DataTableColumn ID="colAccepted" Header="Accepted" />
<DataTableColumn ID="colEnriched" Header="Enriched" />
<DataTableColumn ID="colValidated" Header="Validated" />
<DataTableColumn ID="colToBeSigned" Header="To be signed" />
<DataTableColumn ID="colToRelease" Header="To release" />
<DataTableColumn ID="colReleased" Header="Released" />
<DataTableColumn ID="colSending" Header="Sending" />
<DataTableColumn ID="colSent" Header="Sent" />
</DataTable>
如何向表中添加行?
答案 0 :(得分:0)
Lumpi,
对于动态行(数据源中每行显示一行),在每个DataTableColumn元素下添加Label元素,如下所示:
<DataTable ID="tblPreview" Width="1000" ResizableColumns="True">
<DataTableColumn ID="colLabel" Header="Label">
<Label Caption="@Data.Column1~" />
</DataTableColumn>
<DataTableColumn ID="colAccepted" Header="Accepted">
<Label Caption="@Data.Column2~" />
</DataTableColumn>
<DataTableColumn ID="colEnriched" Header="Enriched">
<Label Caption="@Data.Column3~" />
</DataTableColumn>
<DataTableColumn ID="colValidated" Header="Validated">
<Label Caption="@Data.Column4~" />
</DataTableColumn>
<DataTableColumn ID="colToBeSigned" Header="To be signed">
<Label Caption="@Data.Column5~" />
</DataTableColumn>
<DataTableColumn ID="colToRelease" Header="To release">
<Label Caption="@Data.Column6~" />
</DataTableColumn>
<DataTableColumn ID="colReleased" Header="Released">
<Label Caption="@Data.Column7~" />
</DataTableColumn>
<DataTableColumn ID="colSending" Header="Sending">
<Label Caption="@Data.Column8~" />
</DataTableColumn>
<DataTableColumn ID="colSent" Header="Sent">
<Label Caption="@Data.Column9~" />
</DataTableColumn>
</DataTable>
数据引用将绑定到数据源中的列。
对于静态行,请使用Rows元素:
<Rows>
<Row ID="row1">
<Column ID="colLabel">
<Label Caption="@Data.value1~" />
</Column>
<Column ID="colAccepted">
<Label Caption="@Data.value2~" />
</Column>
<Column ID="colEnriched">
<Label Caption="@Data.value3~" />
</Column>
<Column ID="colValidated">
<Label Caption="@Data.value4~" />
</Column>
<Column ID="colToBeSigned">
<Label Caption="@Data.value5~" />
</Column>
<Column ID="colToRelease">
<Label Caption="@Data.value6~" />
</Column>
<Column ID="colReleased">
<Label Caption="@Data.value7~" />
</Column>
<Column ID="colSending">
<Label Caption="@Data.value8~" />
</Column>
<Column ID="colSent">
<Label Caption="@Data.value9~" />
</Column>
</Row>
<Row ID="row2">
<Column ID="colLabel">
<Label Caption="@Data.value10~" />
</Column>
<Column ID="colAccepted">
<Label Caption="@Data.value11~" />
</Column>
<Column ID="colEnriched">
<Label Caption="@Data.value12~" />
</Column>
<Column ID="colValidated">
<Label Caption="@Data.value13~" />
</Column>
<Column ID="colToBeSigned">
<Label Caption="@Data.value14~" />
</Column>
<Column ID="colToRelease">
<Label Caption="@Data.value15~" />
</Column>
<Column ID="colReleased">
<Label Caption="@Data.value16~" />
</Column>
<Column ID="colSending">
<Label Caption="@Data.value17~" />
</Column>
<Column ID="colSent">
<Label Caption="@Data.value18~" />
</Column>
</Row>
</Rows>
希望这有帮助。