8,833
社区成员
发帖
与我相关
我的任务
分享
var countrys = MasterCommonService.GetAllCountryByContinent(continent.ContinentId);
if (countrys != null && countrys.Count > 0)
{
foreach (var country in countrys)
{
//
var add = new AddressVM
{
Country = country,
Owner = this,
IsVisible = Visibility.Visible,
};
Adderss.Add(add);
}
}
}
}
catch (Exception ex)
{
MsgBox.ShowError(ex);
}
RaisePropertyChanged(() => Adderss);
<dxg:GridControl.Columns>
<dxg:GridColumn Header="操作" Width="52" VisibleIndex="0" >
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsVisible}">
<Button Style="{StaticResource Common_Dg_Add}" Command="{Binding DataContext.RowData.Row.AddRowCommand,RelativeSource={RelativeSource Mode=TemplatedParent}}" ToolTip="{Binding DataContext.RowData.Row.MenuName,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="{Binding DataContext.RowData.Row.CreateVisiblity,RelativeSource={RelativeSource Mode=TemplatedParent}}" />
<Button Style="{StaticResource Common_Dg_Edit}" Command="{Binding DataContext.RowData.Row.EditRowCommand,RelativeSource={RelativeSource Mode=TemplatedParent}}" />
<Button Style="{StaticResource Common_Dg_Delete}" Command="{Binding DataContext.RowData.Row.DeleteRowCommand,RelativeSource={RelativeSource Mode=TemplatedParent}}" />
</StackPanel>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="名称" FieldName="Country.Name" Width="200" VisibleIndex="1" />
<dxg:GridColumn Header="别名" FieldName="Country.EnglishName" Width="200" VisibleIndex="2" />
</dxg:GridControl.Columns>