[Mono-devel-list] ASP.NET Repeater + subitem events that update the underlying item, manual refresh necessary, bug?

Sebastian Nowozin nowozin at gmail.com
Thu Nov 25 09:45:54 EST 2004


Hi Rafael,

The form stuff is alright in the code, I am pretty sure (now, that is ;-).

After long time googling, I finally found the clue at
http://groups.google.com/groups?hl=en&lr=&newwindow=1&frame=right&th=1f339bd77d685c0&seekm=PV31w6YKDHA.2584%40cpmsftngxa06.phx.gbl#link1

The basic problem is that I change the underlying data source long
after the standard databinding has taken place. When I move the
databind call to the last possible stage in the PreRender event, it
works. That is, I now use this code:

        public void Page_PreRender (object sender, EventArgs ev)
        {
            ImageRepeater.DataSource = Orders;
            ImageRepeater.DataBind ();
        }

And register it in OnInit:

            this.PreRender += new System.EventHandler (this.Page_PreRender);

This works. (Albeit I have an unrelated bug now in the code, for which
I filed bug 69914 on bugzilla at
http://bugs.ximian.com/show_bug.cgi?id=69914), as I clearly think its
a bug.

As you have asked, the code is my own, just written a few days ago,
not something that already runs successfully somewhere else ;-)

bye,
Sebastian



More information about the Mono-devel-list mailing list