Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2010, 01:20 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Red face Chapter 12, Customizing GridView Columns

Hi,
On page 404 it asks me to click on the Advanced... button to have VWD generate commands for INSERT, UPDATE, and DELETE. However when the dialog box comes up everything is greyed out and not accessible.

I cancelled out and continued, but now on page 406, step 10, I cannot find the label control "ItemTemplate" mentioned. Can you help?

Fred
 
Old May 31st, 2010, 01:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Fred,

Did you give your table an ID column that is the primary key and an identity?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 31st, 2010, 01:29 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

Hi Imar,

Thanks for the quick response. In my database (which BTW is MSSQL 2005), in the review table, I have the ID column as the primary key, "Is identity" is YES, identity increment is 1, and identity seed is 1.

Is this what you meant?

Fred
 
Old May 31st, 2010, 01:57 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, that's exactly what I meant. Not having a primary key has so far been the only reason for the items being grayed out.

What happens when you try a different table? Do you get the same behavior? And this might be obvious, but is the table you used to check the column in the same database as the one you're using on page 404?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Wilfredo Rosado (May 31st, 2010)
 
Old May 31st, 2010, 02:10 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

Hi Imar,

You're the man! My bad! I was using the SQL 2005 database, but looked at the express database. The SQL 2005 version had no primary key set. After setting it the option is now available in the Advanced options dialog box.

One thing however, would the above problem prevent me from not having the label control "ItemTemplate" of the Authorized field, as mentioned on page 406 step 10?

Much Thanks,
Fred
 
Old May 31st, 2010, 03:32 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
One thing however, would the above problem prevent me from not having the label control "ItemTemplate" of the Authorized field, as mentioned on page 406 step 10?
I don't think so. I just tried it with a new database and a table without a primary key, and converting a field to a Template Field does give me the label inside the ItemTemplate item.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Wilfredo Rosado (June 4th, 2010)
 
Old June 4th, 2010, 03:46 PM
Authorized User
 
Join Date: Dec 2009
Posts: 63
Thanks: 18
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Wilfredo Rosado
Default

Thanks Imar...this section is now working oK.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to freeze GridView columns? MLaGrange BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 September 16th, 2010 10:10 PM
Chapter 4 - customizing ToDoList - ruled lines not working correctly gregking BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 April 3rd, 2009 09:44 AM
Need to get value of gridview template columns for kmh030 ASP.NET 2.0 Professional 1 January 6th, 2007 11:10 PM
Hyperlinks in GridView Columns monika.oberoi ASP.NET 2.0 Professional 2 December 22nd, 2006 04:21 AM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.