2017-02-20 4 views
0

내 GridView 열 IsActive (부울 형식) 내보기 양식 전달하려고합니다.DataTable에서 CheckEdit 값을 설정하는 방법은 무엇입니까?

의 GridView/DataTable에 열 이름 :이 isActive (d_Boolean (char1을))는

양식 CheckEdit 이름 : chkIsActive

다음은

는 양식 코드

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

+1

DevExpress는 정말 멋진 지원을하고 있습니다. DevExpress에 대한 질문은 지원 포럼에 직접 문의하는 대신 본 적이 있습니다. –

+0

간단합니다. 기존 시스템에 플러그인 시스템을 코딩했기 때문에 Devexpress DLL 만 사용했기 때문입니다. –

답변

0

난을 해결하다 문제를 놓치고있는 것을 발견했습니다. Covert this gridView1_form1.GetFocusedRowCellValue ("IsActive"). ToString()을 Text에서 Boolean으로 변환합니다.

이후 모든 작업이 정상입니다.