我有一个CheckBox
未绑定Column
的GridControl
。现在它想让他控制并在另一个表Selected/Checked
Row
中插入这些行。Grid
WPF
XAML
<dxg:GridControl Name="grdInfill" Height="700" VerticalAlignment="Center">
<dxg:GridControl.Columns>
<dxg:GridColumn AllowEditing="True" FieldName="Dummy">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<CheckBox Name="chkSelect" HorizontalAlignment="Center" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.RowData.Row.GlassType}" Checked="CheckEdit_Checked" Unchecked="CheckEdit_Unchecked" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="GlassType" AllowEditing="False">
</dxg:GridColumn>
<dxg:GridControl.View>
<dxg:TableView Name="grdInfillInner" ShowTotalSummary="True" AutoWidth="True" DetailHeaderContent="True" ShowIndicator="False" ShowGroupPanel="False" CellValueChanging="grdInfillInner_CellValueChanging"><!--GroupRowTemplate="{StaticResource descriptionHeader}"-->
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
Code
protected void GetAllInfills()
{
List<Infill> infillList = new List<Infill>();
infillList=BLL.GetAllInfills();
if (infillList != null)
{
grdInfill.ItemsSource = infillList;
grdInfill.GroupBy(grdInfill.Columns["Glass.GlassType"], ColumnSortOrder.Ascending);
grdInfill.GroupBy(grdInfill.Columns["Glass.Glass_Description"], ColumnSortOrder.Ascending);
grdInfill.AutoExpandAllGroups = true;
}
}
如何获取按钮单击上的选定行值!