This is a migrated thread and some comments may be shown as answers.

Problem with object datasource

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 07 Mar 2009, 10:33 PM
Hi,

I have a grid bound to an objectdatasource.
I represents a shoping cart. Now my problem.

The cart class (reduced) 3 properties:
CartID, LineNumber, NumItems
Only NumItems is editable the other fields are readonly.
There is a static method called "UpdateNumItems" definedt like this:

public static int CartLinesChangeNumItems(string strCartID, int nLineNumber, int nNumItems) {  
... 
When I update in the grid it tells me "There is no generic method accepting strCartID, nLineNumber, nNumItems, NumItems, LineNumber, CartID
This is when I set (what's correct) CartID and NumItems as DatakeyNames.
If I remove the datakeyNames I get There is no... accepting strCartID, nLineNumber, nNumItems, NumItems

So I guess Grid uses the Parameters from the update parameters - and it adds his fields to this collection.

My Question now - how can I tell Grid the "translation" -- so I can Say NumItems is Parameter strNumItems.

Of course I could change the parameter names on the functions (then it works) -- but what if I am not able to do this?

Regards

Manfred

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Mar 2009, 02:36 PM
Hello Manfred,

Based on this information, it is hard to determine how the grid is setup, and how the object datasource is configured. If the problem persists, you can open a formal support ticket, and send us a small project, demonstrating your approach, along with the generated exceptions.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or