title: how to refresh datagrid in windows mobile?
body: <p>how to refresh datagrid in windows mobile? by using c#.</p>
  
  <p>how to clear to datagrid and re bind ? </p>
  
  <p>datagrid bind to table. it is not refreshing when i insert another row</p>
  
  <p>please give any solution for this.</p>
  
  <p>i am writing for binding to datagrid</p>
  
  <p>DataTable dataTable = dsRates.Tables[0];</p>
  
  <pre><code>            DataGridTableStyle tableStyle = new DataGridTableStyle();
  
              tableStyle.MappingName = dataTable.TableName;
  
              GridColumnStylesCollection columnStyles = tableStyle.GridColumnStyles;
  
              DataGridTextBoxColumn columnStyle = new DataGridTextBoxColumn();
              columnStyle.MappingName = "MortgageTypeName";
              columnStyle.HeaderText = "Years";
              columnStyle.Width = 58;
              columnStyles.Add(columnStyle);
  
              columnStyle = new DataGridTextBoxColumn();
              columnStyle.MappingName = "FixedRate";
              columnStyle.HeaderText = "Fixed(%)";
              columnStyle.Width = 64;
              columnStyles.Add(columnStyle);
  
              columnStyle = new DataGridTextBoxColumn();
              columnStyle.MappingName = "ARMRate";
              columnStyle.HeaderText = "ARM(%)";
              columnStyle.Width = 64;
              columnStyles.Add(columnStyle);
  
  
              GridTableStylesCollection tableStyles = dgRates.TableStyles;
              tableStyles.Add(tableStyle);
  
  
              dgRates.PreferredRowHeight = 16;
              dgRates.RowHeadersVisible = false;
              dgRates.DataSource = dataTable;
  </code></pre>