Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:12:51+00:00 2026-06-17T16:12:51+00:00

The Problem: An ObjectDataSource is sending over a (basically) empty data object when calling

  • 0

The Problem: An ObjectDataSource is sending over a (basically) empty data object when calling the update method by means of a FormView. The only fields with values are fields listed in the FormView’s DataKeyNames property.

Note: I am using Telerik RadPanelBars within the FormView.

When I break on the FormView’s ItemUpdating event, I see that:

  • The Keys list has two items, just like the DataKeyNames property. That looks good.
  • The OldValues and NewValues dictionaries are empty. They don’t have anything in them. Not field names with null values – they are literally empty lists with zero items.

When we get to the ObjectDataSource’s Updating event, we see a ProjectTask object with just two values (matching the DataKeyNames fields) – all other fields are null.

Here is the update method I’m using:

    public static void UpdateProjectTask(ProjectTask projectTask)
    {
        var dc = new PrbDataContext();
        dc.ProjectTasks.Attach(projectTask, true);
        dc.SubmitChanges();
    }

Here’s the markup for the ObjectDataSource and FormView:

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="ProjectBilling.Business.Data.ProjectTask"
        SelectMethod="GetProjectTask" TypeName="ProjectBilling.Business.Data.ProjectTask" UpdateMethod="UpdateProjectTask" OldValuesParameterFormatString="original_{0}" OnUpdating="ObjectDataSource1_Updating">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="projectTaskId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" DefaultMode="Edit"
        DataKeyNames="Id,Timestamp" OnItemUpdated="FormView1_ItemUpdated" Width="600px">

Important: I’m using Telerik controls and they require an odd binding.

    DataBinder.Eval(FormView1.DataItem, "TaskTemplateId")

I also tried this method, which didn’t yield any better results:

    ((ProjectBilling.Business.Data.ProjectTask)(Container.DataItem ?? new ProjectBilling.Business.Data.ProjectTask())).BillNarrative

The control is retrieving data just fine; I just can’t update it.

Thanks as always for your help, gentlemen.

This fellow seems to be having a similar problem: Can’t get FormView values from ObjectDataSource on update

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:12:52+00:00Added an answer on June 17, 2026 at 4:12 pm

    Telerik’s RadPanelBar does not support databinding in markup. That is what is causing the empy OldValues and NewValues collections.

    Note: Leaving this question up here because it took me forever to figure this out and there is very little on the interwebs about it. Telerik support finally had to own up to the fact that databinding doesn’t work within RadPanelBar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I am trying to build a recursive tree using a function and data
Problem occured when i tried to display xml data that has been taken by
I have a problem with my FromView. I would like to show some data
I am a learner and i have a problem data binding the dataset. Please
I have a fairly simple asp grid view, tied to an object data source.
I've a Gridview control using an ODS(ObjectDataSource) to fetch data. For the best performance
In ASP.NET, I have a FormView which is bound to an ObjectDataSource. The FormView
I have a Select method connected to an ObjectDatasource, this method might throw an
I have a detailsview that has multiple fields and is always only used in
I have an objectdatasource which i want to bind to a repeater. the problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.