title: Editable datagrid in windows mobile compact framework c#
body: <p>So I am trying to add editable column to datagrid. I followed msdn sample at <a href="http://msdn.microsoft.com/en-us/library/ms838165.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms838165.aspx</a> 
   which works, up to a point when I'm trying to type in data to the textbox, which kinda defies the whole point.  I tried to set focus() property to the textbox, yet no results.
  I'm using compact framework 3.5.</p>
  
  <p>150 lines of code can be found here, if someone is willing to try it - <a href="http://pastebin.com/08bz8scH" rel="nofollow">http://pastebin.com/08bz8scH</a></p>
  
  <p>Can you please tell what am i doing wrong? Here is important code sample:</p>
  
  <pre><code>    private void dataGrid1_CurrentCellChanged(object sender, EventArgs e)
      {
          if (!inUpdateMode)
          {
              if (inEditMode &amp;&amp; !dataGrid1.CurrentCell.Equals(editCell))
              {
                  // Update edited cell
                  inUpdateMode = true;
                  dataGrid1.Visible = false;
                  DataGridCell currentCell = dataGrid1.CurrentCell;
                  dataGrid1[editCell.RowNumber, editCell.ColumnNumber] =
                    txtEdit.Text;
                  dataGrid1.CurrentCell = currentCell;
                  dataGrid1.Visible = true;
                  inUpdateMode = false;
                  txtEdit.Visible = false;
                  inEditMode = false;
                  bool ff = dataGrid1.TableStyles.IsReadOnly;
              }
  
              // Enter edit mode
              editCell = dataGrid1.CurrentCell;
              txtEdit.Text = ""; //(string)dataGrid1[editCell.RowNumber,editCell.ColumnNumber];
              System.Drawing.Rectangle cellPos = dataGrid1.GetCellBounds(editCell.RowNumber,
                editCell.ColumnNumber);
              txtEdit.Left = cellPos.Left ;
              txtEdit.Top = cellPos.Top + dataGrid1.Top ;
              txtEdit.Width = cellPos.Width ;
              txtEdit.Height = cellPos.Height ;
              txtEdit.Visible = true;
              txtEdit.Focus();
              inEditMode = true;
          }
  
  
      }
  </code></pre>