title: How to copy all values from data grid?
body: <p>I have to export datagrid values to Excel. Iam using following code to copy datagrid values.</p>
  
  <pre><code>InvoiceDataGrid.SelectAllCells()
  InvoiceDataGrid.ClipboardCopyMode = DataGridClipboardCopyMode.IncludeHeader
  ApplicationCommands.Copy.Execute(Nothing, Me.InvoiceDataGrid)
  Dim result1 As String = Clipboard.GetData(DataFormats.Text)
  InvoiceDataGrid.UnselectAllCells()
  </code></pre>
  
  <p>But some times it do not fetch the integer values from the grid. Please help me. .</p>