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

[Solved] Info OA Grid DataField Case Sensitive - Update

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Markus
Top achievements
Rank 2
Markus asked on 23 Nov 2010, 09:05 AM
Hi there

I had some troubles with my RadGrid updated bound to my OA DataSource.

The solution is quite easy but still I had some time to find it thats why I share it here - I hope it helps others.

The DataField of the grid is case sensitve when it comes to inserts and updates with OA.

The Problem is that it is not case sensitive to dispalay data so you might not catch the reason so soon.

Lets say I have a field uPassword in my DB. OA can make a UPassword out of it!

So you might use this code to display data in a grid.

<telerik:GridBoundColumn DataField="uPassword" HeaderText="Password" 
            UniqueName="uPassword" >
        </telerik:GridBoundColumn>

This will actually work and display the Password. It does not matter to the grid if you use DataField="uPassword" or DataField="UPassword"

But unless you have it right case sensitive wise

<telerik:GridBoundColumn DataField="UPassword" HeaderText="Password" 
            UniqueName="uPassword" >
        </telerik:GridBoundColumn>

The inserts and updates will fail. Telling you that there is no uPassword!

Hope this helps

Markus

1 Answer, 1 is accepted

Sort by
0
Petko_I
Telerik team
answered on 26 Nov 2010, 12:30 PM
Hi Markus Berchtold,

Your observations are correct. Indeed it matters how the DataField is specified for updates and inserts. We appreciate that you share this information so that less confusion is generated. The properties are discovered for updates and inserts based on their name and that is why it is important to have them spelled exactly as they exist in the class.

Do not hesitate to share anything else that you find is valuable for the Telerik users to know.

Regards,
Petko_I
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
General Discussions
Asked by
Markus
Top achievements
Rank 2
Answers by
Petko_I
Telerik team
Share this question
or