问题描述
< datagrid name =itemGridgrid.row =5grid.column =0grid.columnspan =4autogeneratecolumns =Falsemargin =0,25,0,5grid。 rowspan =2canuserreordercolumns =Falsecanuserresizecolumns =Falsecanusersortcolumns =Falseselectionunit =Cellcanuserresizerows =False>
< datagrid.columns>
< datagridtextcolumn header =Sr No. width =50>
< datagridtemplatecolumn header =Itemwidth =300>
< datagridtemplatecolumn.celltemplate>
< datatemplate>
< local:filteredcombobox x:name =FilteredComboBox1itemssource ={Binding}itemspanel ={DynamicResource ItemsTemplate}xmlns:x =#unknownxmlns :local =#unknown>
< datagridtextcolumn header =Quantitywidth =100>
< datagridtextcolumn header =单价width =100>
< datagridtextcolumn header =Vat%width = 100>
< datagridtext column header =Discountwidth =100>
< datagridtextcolumn header =Sub-Totalwidth =170>
< comboboxitem>
<datagrid name="itemGrid" grid.row="5" grid.column="0" grid.columnspan="4" autogeneratecolumns="False" margin="0,25,0,5" grid.rowspan="2" canuserreordercolumns="False" canuserresizecolumns="False" canusersortcolumns="False" selectionunit="Cell" canuserresizerows="False">
<datagrid.columns>
<datagridtextcolumn header="Sr No." width="50">
<datagridtemplatecolumn header="Item" width="300">
<datagridtemplatecolumn.celltemplate>
<datatemplate>
<local:filteredcombobox x:name="FilteredComboBox1" itemssource="{Binding}" itemspanel="{DynamicResource ItemsTemplate}" xmlns:x="#unknown" xmlns:local="#unknown">
<datagridtextcolumn header="Quantity" width="100">
<datagridtextcolumn header="Unit Price" width="100">
<datagridtextcolumn header="Vat %" width="100">
<datagridtextcolumn header="Discount" width="100">
<datagridtextcolumn header="Sub-Total" width="170">
<comboboxitem>
推荐答案
这篇关于如何在运行时在datagridtextcolumn中输入数据。并在datagrid的末尾添加新行以获取新数据......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!