0

I try to pass my gridview column IsActive (Boolean type) to my view form.

GridView / DataTable Column Name : IsActive (d_Boolean(char1))

Form CheckEdit Name : chkIsActive

Below is the Form Code

public partial class PayrollBBNationalForm : DevExpress.XtraEditors.XtraForm
{
    private BCE.Data.DBSetting mydbset_form1;
    private DataTable tableMaster_form1;
    private int row_form1;
    private string mode_form1;
    private GridView gridView1_form1;

    public PayrollBBNationalForm(BCE.Data.DBSetting mydbset, DataTable tableMaster, GridView gridView1, String mode, int row)
    {
        /// Initialize Values from Master WinForm
        mydbset_form1 = mydbset;
        tableMaster_form1 = tableMaster;
        gridView1_form1 = gridView1;
        mode_form1 = mode;
        row_form1 = row; 

        InitializeComponent();
        this.Load += Form_Load;
    }
    #region Load Form Data
    private void Form_Load(object sender, EventArgs e)
    {
        textNationalCode.Text = gridView1_form1.GetFocusedRowCellValue("NationalCode").ToString();
        textNationalCountry.Text = gridView1_form1.GetFocusedRowCellValue("NationalCountry").ToString();
        textGovermentCode.Text = gridView1_form1.GetFocusedRowCellValue("GovermentCode") != null ? gridView1_form1.GetFocusedRowCellValue("GovermentCode").ToString() : "";
        textRemarks.Text = gridView1_form1.GetFocusedRowCellValue("Remarks").ToString();
        memoNote.Text = gridView1_form1.GetFocusedRowCellValue("Note").ToString();

        chkIsActive = /// I stuck at here. This unable to pass gridView1_form1.GetFocusedRowCellValue("IsActive");

    }
    #endregion

}

enter image description here

Brian Ng
  • 35
  • 3
  • 12
  • 1
    DevExpress has such an awesome support, I've never saw a reason to ask DevExpress questions here on SO instead of directly in their support forums. – Uwe Keim Feb 20 '17 at 07:59
  • Simple, because i code an plug-in system into the existing one, plus i only use Devexpress DLL for this reason. – Brian Ng Feb 20 '17 at 08:33

1 Answers1

0

I solve the issue, I found what have miss out. Covert this gridView1_form1.GetFocusedRowCellValue("IsActive").ToString() from Text to Boolean.

Afterward every work OK.

Brian Ng
  • 35
  • 3
  • 12