'宣言
Public Property NewRowPosition As NewRowPosition
public NewRowPosition NewRowPosition {get; set;}
'宣言
Public Property NewRowPosition As NewRowPosition
public NewRowPosition NewRowPosition {get; set;}
private void SG2_InitializingNewItem(object sender, InitializingNewItemEventArgs e) { // Initialize the new item of new row. // e.NewItem = new MyData(); }
Private Sub SG2_InitializingNewItem(sender As Object, e As InitializingNewItemEventArgs) ' Initialize the new item of new row. ' e.NewItem = new MyData(); End Sub
<sg:GcSpreadGrid Name="SG2" ItemsSource="{Binding}" CanUserAddRows="True" NewRowPosition="Top" InitializingNewItem="SG2_InitializingNewItem" />