Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Server Control and Component Development by Dr. Shahram Khosravi; ISBN: 9780471793502
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 2nd, 2008, 08:53 AM
Registered User
 
Join Date: Nov 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Value must be of type 'GridView'

Going through the book and I love it.

Just one question.
When I drag the Custom Gridview from ch 18 and 19 on a form I get a designer error saying:
Error 1 gv:Value must be of type 'System.Web.UI.WebControls.GridView'.
Parameter name: component

What is wrong?

Thanks

Ron
Reply With Quote
  #2 (permalink)  
Old January 19th, 2016, 04:58 PM
Registered User
Points: 55, Level: 1
Points: 55, Level: 1 Points: 55, Level: 1 Points: 55, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2014
Location: Colorado
Posts: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Default Custom Gridview from ch 18 and 19

This problem is related to the Designer attribute. The line of code in question is in GridView.cs and is written as [DesignerAttributre("system.Web.UI...")]
If you rem this line out the error will go away but then you will get an error stating that the "...DataRowView does not expose the BookID field". If you remove the DataKeyNames="BookID" from the tool that problem will go away and the tool will appear as it should.

I don't believe that these are the solutions to the problems and I have tried to find the correct answer for both them. I consider my "fixes" more as workarounds than fixes. It's possible that earlier versions of Visual Studio (i.e. 2005) needed the design attribute and later versions (i.e. 2010 and up) don't need it or need something else instead. I can't find a list of possible values and the internet talks more about attributes I already know about than this one.

Let me know if you found/find anything out about this.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
Schema derived type and the base type bonekrusher XML 5 January 8th, 2008 08:04 AM
Guidelines Item 3: Replace System.Type with Type Ixtlia BOOK: Professional .NET 2.0 Generics 0 August 19th, 2007 04:09 AM
Conversion from type 'DBNull' to type 'String' is GailCG ASP.NET 2.0 Basics 5 February 22nd, 2007 02:12 PM



All times are GMT -4. The time now is 02:00 AM.


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