Monday, August 4, 2008

Forcing a re-query with LLBL Gen Pro Data Source

I used a DataList control for an ASP.NET page, instead of the GridView that we've all come to know and love, and I stumbled across the fact that the DataList doesn't handle the Edit, Update and Delete events automatically like the GridView does. Okay, I admit it, I haven't been doing any hands-on U.I. development for a long long time.

So, I write my custom code to manipulate data with the DataList and oddly enough, the code to modify the data executes but the new data doesn't appear. I guessed the LLBLGen Data Source control must have something to do with it - those things are really lazy little creatures that do not do things unless they absolutely have to so I set the Refetch property to true before the DataBind. That fixed it!

No comments: