This example demonstrates how the DataGridAdapter can be used with custom objects. see code
HTML used for layout has been removed for clarity
<%@ Register TagPrefix="Fluent" Namespace="Fluent" Assembly="Fluent.DataGridAdapter" %> <script runat="server"> // This handles the DataGridBinding event of the DataGridAdapter. private void DataGridAdapter1_DataGridBinding(DataGridAdapter sender, DataGridBindingEventArgs e) { ArrayList colors = new ArrayList(); foreach(KnownColor kc in Enum.GetValues(typeof(KnownColor))){ colors.Add(Color.FromKnownColor(kc)); } DataGridAdapter1.DataSource = colors; LabelFilter.Text = "Filter: " + DataGridAdapter1.Filter; LabelSort.Text = "Sort: " + DataGridAdapter1.SortExpression; } private void DropDownFilter_SelectedIndexChanged(object sender, EventArgs e){ DataGridAdapter1.Filter = DropDownFilter.SelectedItem.Value; DataGridAdapter1.BindDataGrid(); } </script> ... <asp:DropDownList Width="100" Runat="server" ID="DropDownFilter" CssClass="medHeader" AutoPostBack="True" OnSelectedIndexChanged="DropDownFilter_SelectedIndexChanged"> <asp:ListItem Value="" >All Colors</asp:ListItem> <asp:ListItem Value="R > G AND R > B" >Reds</asp:ListItem> <asp:ListItem Value="G > R AND G > B" >Greens</asp:ListItem> <asp:ListItem Value="B > G AND B > R" >Blues</asp:ListItem> <asp:ListItem Value="R = B AND B = G" >Greys</asp:ListItem> </asp:DropDownList> <asp:DataGrid ID="DataGrid1" Runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True" PagerStyle-Mode="NumericPages" PageSize="20" > <Columns> <asp:BoundColumn ItemStyle-Width="20%" DataField="Name" HeaderText="Name" SortExpression="Name"/> <asp:TemplateColumn ItemStyle-Width="20%" HeaderText="Color" SortExpression="Name" > <ItemTemplate> <asp:Label Runat="server" Width="50" BackColor="<%# Container.DataItem %>" /></ItemTemplate> </asp:TemplateColumn> <asp:BoundColumn ItemStyle-Width="10%" DataField="R" HeaderText="R" SortExpression="R"/> <asp:BoundColumn ItemStyle-Width="10%" DataField="G" HeaderText="G" SortExpression="G"/> <asp:BoundColumn ItemStyle-Width="10%" DataField="B" HeaderText="B" SortExpression="B"/> <asp:BoundColumn ItemStyle-Width="10%" DataField="IsSystemColor" HeaderText="System Color" SortExpression="IsSystemColor"/> </Columns> </asp:DataGrid> <Fluent:DataGridAdapter ID="DataGridAdapter1" Runat="Server" DataGridToBind="DataGrid1" SortHistory="3" AutoDataBind="True" OnDataGridBinding="DataGridAdapter1_DataGridBinding" />