P
Peter Rilling
I have an interesting issues that, although I not blocking me, is not very
performance. Maybe someone can suggest a better way of doing this.
1) I have a page that displays a grid with command links such as Delete.
Obviously if this link will delete the item of the current line.
2) The grid is initialized during the Init event so that the events can be
bound. It is my understanding that events do not get fired unless the
object structure is complete, so I do this in the Init. A call to the
database gets the list of current items.
3) Then the command event fires and I make a call to the database to remove
the item.
4) On PreRender, I then query the database again for the list and build it.
This is because the currently bound data is for the list containing the item
that was just removed. I need to refresh it.
As you can see, I am querying the database twice, when the page first
initializes, then before it renders. Do I have to do it this way, or is
there some way to only query the database one.
performance. Maybe someone can suggest a better way of doing this.
1) I have a page that displays a grid with command links such as Delete.
Obviously if this link will delete the item of the current line.
2) The grid is initialized during the Init event so that the events can be
bound. It is my understanding that events do not get fired unless the
object structure is complete, so I do this in the Init. A call to the
database gets the list of current items.
3) Then the command event fires and I make a call to the database to remove
the item.
4) On PreRender, I then query the database again for the list and build it.
This is because the currently bound data is for the list containing the item
that was just removed. I need to refresh it.
As you can see, I am querying the database twice, when the page first
initializes, then before it renders. Do I have to do it this way, or is
there some way to only query the database one.