示例#1
0
 private void SfDataGrid_ma_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
 {
     if (e.DataRow.RowType == RowType.DefaultRow)
     {
         string selected = this.newacc_typeBox.GetItemText(this.newacc_typeBox.SelectedItem);
         var    custInfo = this.sfDataGrid_cm.CurrentItem as Customer;
         ma_nameBox.Text     = this.sfDataGrid_ma.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Id").ToString();
         ma_typeBox.Text     = this.sfDataGrid_ma.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Name").ToString();
         ma_interestBox.Text = this.sfDataGrid_ma.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Interest").ToString();
         ma_feeBox.Text      = this.sfDataGrid_ma.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Fee").ToString();
         ma_balBox.Text      = this.sfDataGrid_ma.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Balance").ToString();
         var radio = custInfo.Staff.ToString();
         if (radio == "True")
         {
             radioButton6.Checked = true;
             radioButton5.Checked = false;
         }
         else if (radio == "False")
         {
             radioButton6.Checked = false;
             radioButton5.Checked = true;
         }
     }
     else if (e.DataRow.RowType == RowType.HeaderRow)
     {
         var cellValue = e.DataColumn.GridColumn.HeaderText;
     }
 }
示例#2
0
 private void SfDataGrid_cm_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
 {
     if (e.DataRow.RowType == RowType.DefaultRow)
     {
         cm_idbox.Text     = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Id").ToString();
         newacc_idBox.Text = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Id").ToString();
         cm_phoneBox.Text  = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Phone").ToString();
         cm_emailBox.Text  = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Email").ToString();
         cm_nameBox.Text   = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Name").ToString();
         var radio = this.sfDataGrid_cm.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "Staff").ToString();
         if (radio == "True")
         {
             radioButton1.Checked = true;
             radioButton2.Checked = false;
         }
         else if (radio == "False")
         {
             radioButton1.Checked = false;
             radioButton2.Checked = true;
         }
     }
     else if (e.DataRow.RowType == RowType.HeaderRow)
     {
         var cellValue = e.DataColumn.GridColumn.HeaderText;
     }
 }