p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   DetailsView control (http://p2p.wrox.com/showthread.php?t=81438)

stormage October 31st, 2010 08:20 PM

DetailsView control
 
Hello guys...
I had the exact same problem as posted in this thread:

http://p2p.wrox.com/book-beginning-a...behaviour.html

I'm using VS2010 professional on WIN7.

On page 443, by the end of step 5, I dont get the same markup code for the DetailsView as the book states, rather I get the same markup code that Matt posted in the thread linked above, which is:
Code:

  <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1"
    DefaultMode="Insert" Height="50px" Width="125px">
    <Fields>
      <asp:CommandField ShowInsertButton="True" />
    </Fields>
  </asp:DetailsView>

One of Imar's tips in the thread linked above was to click "refresh schema" on the smart task panel of DetailsView in the designer.
Well, I tried that, and only after doing so, I got the same code as in the book except the line:
Code:

<asp:CommandField ShowInsertButton="True" />
,
that was removed, and after repeating step 4 again, the code I got was 100% the same as the code in the book.

Is that the way it should be? is it a known problem?

10x for any answer...[;)]

Imar November 1st, 2010 03:17 AM

Hi there,
Quote:

Is that the way it should be? is it a known problem?
No, it shouldn't be like this. It should work fine the first time you set up the control. And yes, it's more or less a known problem. I've reported similar issues to Microsoft, but never found a good repro scenario that worked every time.

Glad to hear you find a solution. I back linked to this post from the one you linked to in case others run into it as well.

Thansk and Cheers,

Imar


All times are GMT -4. The time now is 07:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.