.net - Prevent databind on Gridview when clicking the Edit template link -
My Gridview refreshes its data source when the Edit button is clicked. How can I prevent it from happening? is? This is not a lot of problems when not many records, but it takes some time when it takes a lot of time. The data has already been loaded so that the editing button does not need to reload the data. The Edit button is a template editing button, and I am using a SQL datasheet that connects to the Oracle database. SQL DataS uses a control parameter that points in the dropdown list.
Any guidance will be appreciated.
I look at two possibilities, both take advantage of SqlDataSource control.
Enabling caching on SqlDataSource control is my favorite, though it can not really solve your problem. Installing the cache properly means you have the ability to push many pages beyond the simple editing scenario, however, so I get grace for things there.
The second option will be to handle the updating event. During the SqlDataSource control updating event, you can set up E. If you determine that you are under the influence of a post for editing, doing so will cause the update to be skipped. This can not really work if the gridwow depends on the update to remember items drawn in a pre-display request, although I have not done enough to use it recently enough if this case If so, you want to handle the updated event on the initial page display and store the resultant data in the self-rolled unclean-cache. You can see that it can be increasingly complex ...
Depending on the details of the matters of use, depending on what you use (and how you use them). This should start looking in the right direction, though.
Comments
Post a Comment