title: DevExpress gridView Data Source
body: <p>I am working on asp web form project with entity framework. I have two entities (users and roles) and I want to implement the following behaviour:
  The gridView must display the roles of one user. 
  What I did so far is to display all the roles.</p>
  
  <pre><code>&lt;dx:ASPxGridView ID="grid"  runat="server" Width="100%" AutoGenerateColumns="False" ClientInstanceName="grid" 
      KeyFieldName="Id" OnDataBinding="grid_DataBinding" DataSourceID="RoleDataSource" EnableTheming="True" Theme="BlackGlass"&gt;
      &lt;ClientSideEvents RowDblClick="function(s, e) {
          s.StartEditRow(e.visibleIndex);}" /&gt;
      &lt;Columns&gt;
          &lt;dx:GridViewDataTextColumn Caption="ID" FieldName="Id" VisibleIndex="0"&gt;
              &lt;EditFormSettings  Visible="false"/&gt;
          &lt;/dx:GridViewDataTextColumn&gt;
          &lt;dx:GridViewDataTextColumn Caption="Role Name" FieldName="name" VisibleIndex="1" &gt;
          &lt;/dx:GridViewDataTextColumn&gt;
  
  
      &lt;/Columns&gt;
      &lt;SettingsBehavior AllowFocusedRow="true" AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" ConfirmDelete="True" /&gt;
  
          &lt;SettingsEditing Mode="PopupEditForm"/&gt;
  
          &lt;SettingsText CommandUpdate="Ajouter/Modifier" PopupEditFormCaption="Ajouter/Modifier" /&gt;
          &lt;SettingsPopup&gt;
              &lt;EditForm AllowResize="True" HorizontalAlign="Center" /&gt;
          &lt;/SettingsPopup&gt;
      &lt;/dx:ASPxGridView&gt;
  
  &lt;asp:EntityDataSource ID="RoleDataSource" runat="server" ConnectionString="name=AccountModelContainer" 
      DefaultContainerName="AccountModelContainer" EntitySetName="RoleSet" EnableDelete="True" EnableInsert="True" EnableUpdate="True"&gt;
  &lt;/asp:EntityDataSource&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>