Search the web
Sign In
New User? Sign Up
StrongTypes · Free .NET Generics Help
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Generics: ObjectDataSource, GridView, and BLL   Message List  
Reply | Forward Message #15 of 44 |
Hi everyone,

I love the idea of generics and am trying to put it to use,
following the samples given on www.asp.net tutorials, specifically:
http://www.asp.net/QuickStart/util/srcview.aspx?
path=~/aspnet/samples/data/GridViewObject.src&file=GridViewObject_vb\
GridViewObject_vb.aspx&lang=VB+Source

I've set up my GridView to access the ObjectDataSource, and my ODS
is set up as:
<asp:ObjectDataSource ID="AllergyODS" Runat="server"
TypeName="AllergiesComponent"

SelectMethod="GetAllergies" UpdateMethod="UpdateAllergy"
DataObjectTypeName="Allergy" SortParameterName="SortExpression">

</asp:ObjectDataSource>

However, whenever I hit Update, I get the dreaded:
ObjectDataSource 'AllergyODS' could not find a non-generic
method 'UpdateAllergy' that takes parameters of type 'Allergy'.

Does anybody have a clue:
a) why this doesn't work as per the examples supplied on asp.net?
b) how I can find the signature of the function that it is trying to
call?

Thanks,
Dave









Thu Feb 16, 2006 6:17 am

preludeandave
Offline Offline
Send Email Send Email

Forward
Message #15 of 44 |
Expand Messages Author Sort by Date

Hi everyone, I love the idea of generics and am trying to put it to use, following the samples given on www.asp.net tutorials, specifically: ...
preludeandave
Offline Send Email
Feb 16, 2006
6:21 am

Hi Dave, This most likely has to do with the primary key. Make sure that the primary key is included in the DataKeyNames property for the GridView. HTH Thank...
Ryan Olshan
teranetlists
Offline Send Email
Feb 16, 2006
6:30 am

Thanks Ryan, Ok, that wasn't the problem. I had that specified in the GridView already. The problem was my function UpdateAllergy, this is what it should be: ...
preludeandave
Offline Send Email
Feb 17, 2006
3:49 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help