Is this possible in DetailsView?

B

B. Chernick

Ok. Webforms project/VB/ASP.net 2.0

I'm trying to whip up a quickie demo and my basic programming model is to
display multiple records in a gridview and use that to select individual
records for editing in a DetailsView. I'm trying to keep this as simple as
possible. So I had this 'bright' idea.

The problem is this: In a particular table, my boss wants several related
fields displayed on the same line. So I made that line a template and
inserted a table with several bound fields, by editing the html directly.
(There's no VB code whatever in this screen... yet.) This arrangement works
fine as far as initial display and the data is still there when I go into
Edit mode. However when I click Update, all data, whether original or
entered, in any of those multiple field lines is lost. Data entered in
conventional non-template lines is saved.

Here's a sample of the raw aspx. Any suggestions?

<asp:Table ID="TableCAPEXsus" runat="server">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox ID="txtCAPEXsus" runat="server"
Text='<%# Bind("CAPEXsus") %>'></asp:TextBox>
</asp:TableCell><asp:TableCell>
<asp:TextBox ID="txtCAPEXsus1"
runat="server" Text='<%# Bind("CAPEXsus1") %>'></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
 
B

B. Chernick

Ok, thanks to a suggestion from a co-worker, I'm going to answer my own
question.

The problem is apparently the asp:table. If I substitute an ordinary
(non-server) html table, the problem goes away.

(But why?)
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top