Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
RowEditTemplate Stops Working
posted

I have an application that allows a user to search a SQL database for a store. The user types in a store name and clicks a button and another, seperate form pops up with a list of stores that match the name that was entered. The user can select one of the stores and the popup form closes and a grid on the main form is populated with data from the database about that store. This is all powered through calling stored proceedures on the SQL server rather than using a dataset and it works without issue. The problem I have is when the user edits a cell in the grid.

I have a RowEditTemplate set up in modal for the grid because the stored procedure gives back more information than the user needs to see, and they are only allowed to edit a few of the fields that they can see. When they click on a cell, the RowEditTemplate pops up and they can make and save their changes. I've added code to the save button to call an update stored procedure and populate the paramters for the procedure. This all works fine as well.

The problem is that when the user searches for another store, then the RowEditTemplate no longer works! Even if they select the same store from the search box! I've stuffed a msgbox into BeforeRowEditTemplateDisplayed to let me know when it is called, and it is not called after the user performs their second search. I have the grid setup to show the RowEditTemplate when the cell changes (OnCellChange), but for some odd reason, it does not want to dispaly the template after the second search is performed by the user.

 Any thoughts as to why this might be occuring?