FormView Buttons

S

shapper

Hello,

I created a FormView at runtime and implemented Insert, Edit and Item
templates through a Class (Implements ITemplate).

Since all my templates are the same, i.e., there are no differences
between them I just used the same class for all.

Can I do this?

And in my ITemplate I created 3 buttons: Insert, Update, Edit and
Cancel.

How can I make the buttons work with FormView?

And how do I have to manual hide or show the buttons depending on
FormView mode?

Thanks,

Miguel
 
N

nothingsoriginalontheinternet

You can use the CommandName property of the buttons to make them
insert, update, edit, and cancel. Just set it to one of those as
strings. You can handle the PreRender event of the buttons to
determine if the mode of the containing FormView should contain each,
and set the Visible property appropriately.

-Mike Placentra II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

iTemplate Formview Problem 3
FormView Buttons 1
FormView > Edit 1
Formview inside of a User Control 1
FormView disappears 2
formview edit issue 12
GridView and FormView 1
Formview template insert to edit mode 1

Top