title: how to use buttonedit in devexpress gridcontrol
body: <p>I am trying to create a gridcontrol with buttonedit in one of the columns. When the user clicks the button edit, it popups up a form to select a product. When the selection is done on the popup, It returns the DataRow from the selection to the main grid like below.</p>
  
  <p>but when the column loses the focus, the value I wrote to the column disappear.</p>
  
  <p><img src="https://i.stack.imgur.com/DW1F6.png" alt="enter image description here"></p>
  
  <p>here is my code which creates the gridcontrol's data and buttonedit's click event.</p>
  
  <pre><code>    private void FrmSiparisNew_Load(object sender, EventArgs e)
      {
          dt = new DataTable();
          dt.Columns.Add("MALZEME_KODU",typeof(string));
          dt.Columns.Add("MALZEME_ACIKLAMA", typeof(string));
          dt.Columns.Add("ADET", typeof(decimal));
          dt.Columns.Add("BIRIM", typeof(string));
          dt.Columns.Add("FIYAT", typeof(decimal));
          dt.Columns.Add("KUR", typeof(string));
          dt.Columns.Add("TUTAR", typeof(decimal));
          DataRow dr = dt.NewRow();
          dt.Rows.Add(dr);
  
          gc.DataSource = dt;
      }
  
      private void repositoryItemButtonEditMalzemeKodu_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
      {
          FrmProducts frm = new FrmProducts(dt_products);
          frm.ShowDialog();
  
          DataRow dr_return = frm.dr;
  
          ButtonEdit buttonEdit = (sender as ButtonEdit);
          buttonEdit.Text = dr_return["URUNKOD"].ToString();
  
      }
  </code></pre>
  
  <p>why does the value disappear? should I first fill the datatable and bind it again? how can I fix this?</p>