Esempio n. 1
0
 private void SfDataGrid1_DataSourceChanged(object sender, Syncfusion.WinForms.DataGrid.Events.DataSourceChangedEventArgs e)
 {
     if (e.NewView != null)
     {
         e.NewView.GroupDescriptions.CollectionChanged += GroupDescriptions_CollectionChanged;
     }
     if (e.OldView != null)
     {
         e.NewView.GroupDescriptions.CollectionChanged -= GroupDescriptions_CollectionChanged;
     }
 }
 private async void sgvCustomers_DataSourceChanged(object sender, Syncfusion.WinForms.DataGrid.Events.DataSourceChangedEventArgs e)
 {
     if (DbContext == null)
     {
         return;
     }
     try
     {
         await DbContext?.SaveChangesAsync();
     }
     catch (Exception exception)
     {
     }
 }
 private void sfDataGrid_DataSourceChanged(object sender, Syncfusion.WinForms.DataGrid.Events.DataSourceChangedEventArgs e)
 {
     sfDataGrid.Columns[0].HeaderText  = "ID";
     sfDataGrid.Columns[1].HeaderText  = "Registration No.";
     sfDataGrid.Columns[2].HeaderText  = "Student Name";
     sfDataGrid.Columns[3].HeaderText  = "Father's Name";
     sfDataGrid.Columns[4].HeaderText  = "Date of Birth";
     sfDataGrid.Columns[5].HeaderText  = "Gender";
     sfDataGrid.Columns[6].HeaderText  = "B.Form";
     sfDataGrid.Columns[7].HeaderText  = "Religion";
     sfDataGrid.Columns[8].HeaderText  = "Contact";
     sfDataGrid.Columns[9].HeaderText  = "Class";
     sfDataGrid.Columns[10].HeaderText = "Section";
     sfDataGrid.Columns[11].HeaderText = "Address";
     sfDataGrid.Columns[12].HeaderText = "Admitted Date";
 }