G
Guest
Hello,
This problem is really frustrating to me. I have a FormView on my page
where I do all of the binding programatically. In other words, I don't
use a datasource control but I bind to the DataSource property. I have
defined an ItemTemplate which is necessary that has only a single link
button with a command of "New." I also have defeined an
InsertItemTemplate with two link buttons with command names of "Insert"
and "Cancel", and various other controls to edit the values I need to.
I have overrode the ModeChanging event to programatically change the
formview mode by calling the ChangeMode method. If I don't override
this function, the ASP. NET infrastructure throws and exception telling
me that I have to override it. Now, when I press the Cancel link
button when in insert mode, the formview DOES NOT revert back to the
default mode, which is readonly, and contains the single link button
with a command name of "New." If I press it again, it does. In other
words, I have to press it twice in order for it to revert back to the
correct mode.
I think there is some sort of bug in the form view control and this is
extremely frustrating because there is no help with respect to this
anywhere.
I hope a MSFT MVP reads this message, because these things should be
easily able to be coded and shouldn't cause any problems.
Hammad
This problem is really frustrating to me. I have a FormView on my page
where I do all of the binding programatically. In other words, I don't
use a datasource control but I bind to the DataSource property. I have
defined an ItemTemplate which is necessary that has only a single link
button with a command of "New." I also have defeined an
InsertItemTemplate with two link buttons with command names of "Insert"
and "Cancel", and various other controls to edit the values I need to.
I have overrode the ModeChanging event to programatically change the
formview mode by calling the ChangeMode method. If I don't override
this function, the ASP. NET infrastructure throws and exception telling
me that I have to override it. Now, when I press the Cancel link
button when in insert mode, the formview DOES NOT revert back to the
default mode, which is readonly, and contains the single link button
with a command name of "New." If I press it again, it does. In other
words, I have to press it twice in order for it to revert back to the
correct mode.
I think there is some sort of bug in the form view control and this is
extremely frustrating because there is no help with respect to this
anywhere.
I hope a MSFT MVP reads this message, because these things should be
easily able to be coded and shouldn't cause any problems.
Hammad