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

Issue with Grid and ObjectDataSource names

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sidharth
Top achievements
Rank 1
Sidharth asked on 11 Feb 2014, 10:59 AM
Hi,
I have a business objects with the following naming convention:

Guid Add(string name, string description, Guid categoryId, Guid createdBy)

The have properties of :
string Name { get; set; }
string Description { get; set; }
Guid CategoryId { get; set; }
Guid CreatedBy { get; set; }

I have created a RadGrid that uses an ObjectDataSource which uses the above business object. The RadGrid has mapping to the properties of the business object, i.e. the initial character is capital (Pascal Casing), but the ObjectDataSource is bound to the Add method, for instance, that has the initial character in lower case (Camel Casing).

Now when I click on the Insert button it throws an error that no Add method found with the parameters Name, Description CategoryId, createdBy (I'm setting the createdBy manually) but how do I bind RadGrid to the ObjectDataSource using the Pascal Casing but when it tries to insert it should use the Camel Casing version? Or should I change the ObjectDataSource to use control parameters? But that would mean changing all the gridboundcolumns to template columns? 

Any advice you can give would be much appreciated.

Kind regards
Sidharth



1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 14 Feb 2014, 09:04 AM
Hello Sidharth,

Would you share your markup with the related code-behind so we could better understand your setup? Being able to see the settings for the RadGrid and the ObjectDataSource could point us in the right direction to finding the reason for the error.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Sidharth
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or