locked
Edit records RRS feed

  • Question

  • User380413204 posted

    Hi,

    Thanks to MaineOne I now have a repeater that shows me some information from a table in a formview (in textboxes)

    The next step would be to edit those textboxes. You often see Gridviews with editfunction, but I need a big box to edit.

    Besides that I need to be able to use Carriagereturns and perhaps a little formatting. (Freetextbox would be handy)

    But I can't get it done to bind the info from the table. Tried to peek at News_edit.aspx because that is what I mean, but that is a bit to complex still.

    Is there an easy way to this?

    Thanks in advance,

    Lex

     

    Monday, July 10, 2006 11:23 AM

All replies

  • User2069888697 posted

    First of all make sure you have  a SqlDatasource assigned to the form.

    <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"

    DefaultMode="Edit" HorizontalAlign=Justify >

     If you do it should auto create all the nessissary fields and add the databinding for you.

    <asp:TextBox ID="CommentTextBox" runat="server"

    Text='<%# Bind("Comment") %>' TextMode="MultiLine" Width="425px"></asp:TextBox>

     Then all you would need to do is swap the textbox with freetextbox and give the form the look you want..

    When the FormView is auto filled it should have an ItemTemplate, InsertItemTemplate and  EditItemTemplate. You can either make edit mode the default mode by adding DefaultMode="Edit" to the formview element or if you want a button to select edit mode just add it to the form and onclick switch modes.

    Monday, July 10, 2006 1:53 PM
  • User380413204 posted

    Cheers Frank,

    That works nice, as always first I am totally at a loss with all this code. But in the end thanks to your help it often works out fine.

    Best regards,

    Lex

    Monday, July 10, 2006 3:36 PM