<asp:Repeater runat="server" id="repList">
<ItemTemplate>
<asp:Literal id="litItem" runat="server" />
</ItemTemplate>
</asp:Repeater>
private void repList_ItemDataBound(object sender, RepeaterItemEventArgs
e)
{
if (e.Item.ItemType == ListItemType.Item)
{
IDictionary dict = (IDictionary)e.Item.DataItem;
Literal litItem = (Literal)e.Item.FindControl("litItem");
foreach (DictionaryEntry entry in dict)
{
litItem.Text = String.Format("Key: [{0}], Value: [{1}]<br />",
entry.Key, // 0
entry.Value); // 1
}
}
}
--- Bjorn I <[EMAIL PROTECTED]> wrote:
> For most of my data I have created valueobjects to
> hold the data, and use that for the resultClass in my
> select statements.
>
> Now my application needs reports, and they might
> change over time. I did not want to create a
> valueobject for each report, so I was trying to return
> a IList of hashtable objects, and bind it to a
> datagrid. I set the returnClass to Hashtable, and call
> QueryByList. This returns the correct list, and I am
> able to bind it to the grid, but it says it can't find
> my columns. Does anybody have any examples of binding
> lists like this. The dev guide, 3.5.8, shows the
> mapped statement, but not how to access the items.
>
> B
>
>
>
>
> __________________________________
> Yahoo! for Good - Make a difference this year.
> http://brand.yahoo.com/cybergivingweek2005/
>