title: Asp.net devexpress : getting the datasource of the aspxgridview back to collection
body: <p>I am very new to dev express . </p>
  
  <pre><code>&lt;dx:ASPxGridView ID="aspxgvOMContracts" runat="server" KeyFieldName="OMContractId" Settings-UseFixedTableLayout="true"
                                  AutoGenerateColumns="False" Settings-HorizontalScrollBarMode="Auto" Width="477px" Theme="PlasticBlue" 
                                  OnRowUpdating="aspxgvOMContracts_OnRowUpdating" OnRowUpdated="aspxgvOMContracts_OnRowUpdated"&gt;
                                  &lt;SettingsPager PageSize="5" /&gt;
                                  &lt;SettingsBehavior AllowFocusedRow="true" /&gt;
                                  &lt;SettingsEditing Mode="Inline" /&gt;
                            &lt;%--      &lt;Styles&gt;
                                      &lt;CommandColumnItem Spacing=""&gt;
                                          &lt;Paddings PaddingLeft="7" PaddingRight="7" /&gt;
                                      &lt;/CommandColumnItem&gt;
                                  &lt;/Styles&gt;--%&gt;
                                  &lt;Columns&gt;
                                      &lt;dx:GridViewCommandColumn ButtonType="Image" Width="65px" VisibleIndex="0"&gt;
                                          &lt;EditButton Visible="True" Image-Url="../Content/Images/icon_edit.png"&gt;
                                          &lt;/EditButton&gt;
                                          &lt;UpdateButton Visible="True" Image-Url="../Content/Images/icon_update.png"&gt;
                                          &lt;/UpdateButton&gt;
                                          &lt;CancelButton Visible="true" Image-Url="../Content/Images/icon_cancel.png"&gt;
                                          &lt;/CancelButton&gt;
                                          &lt;DeleteButton Visible="true" Image-Url="../Content/Images/icon_delete.png"&gt;
                                          &lt;/DeleteButton&gt;
                                          &lt;ClearFilterButton Visible="True"&gt;
                                          &lt;/ClearFilterButton&gt;
                                          &lt;%--  &lt;HeaderTemplate&gt;
                                              &lt;dx:ASPxLabel ID="headerLabel" runat="server"&gt;
                                              &lt;/dx:ASPxLabel&gt;
                                          &lt;/HeaderTemplate&gt;--%&gt;
                                      &lt;/dx:GridViewCommandColumn&gt;
                                      &lt;dx:GridViewDataComboBoxColumn FieldName="OrganisationName" Caption="OrganisationName" VisibleIndex="1"&gt;
                                          &lt;PropertiesComboBox TextField="CompanyName" ValueField="OrganisationId" ValueType="System.Int32"&gt;
                                          &lt;/PropertiesComboBox&gt;
                                      &lt;/dx:GridViewDataComboBoxColumn&gt;
                                      &lt;dx:GridViewDataTimeEditColumn FieldName="DateAnnounced" Caption="DateAnnounced" VisibleIndex="2"&gt;
                                      &lt;/dx:GridViewDataTimeEditColumn&gt;
                                      &lt;dx:GridViewDataTextColumn FieldName="Cost" Caption="Cost" VisibleIndex="3"&gt;
                                      &lt;/dx:GridViewDataTextColumn&gt;
                                      &lt;dx:GridViewDataTextColumn FieldName="CostCurrency" Caption="Cost Currency" VisibleIndex="4"&gt;
                                      &lt;/dx:GridViewDataTextColumn&gt;
                                  &lt;/Columns&gt;
  
                              &lt;/dx:ASPxGridView&gt;
  </code></pre>
  
  <p>and in code behind i Bind the data as </p>
  
  <pre><code>aspxgvOMContracts.DataSource = phase.OMContracts;
          aspxgvOMContracts.DataBind();
  </code></pre>
  
  <p>here phase.OMContracts is of type List()</p>
  
  <p>Now once I edit any row I need the modified collection back . How do I get the modified collection ?</p>