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

  • SEARCH
  • Home
  • 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 6470905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:09:50+00:00 2026-05-25T06:09:50+00:00

I have an ASPxGridView, currently 11.1.7.0, which I populate with an ObjectDatasource. Everything works

  • 0

I have an ASPxGridView, currently 11.1.7.0, which I populate with an ObjectDatasource. Everything works as expected until I use a custom editform. In another control i solved this by using the OnRowInserting attribute in the aspxgridview control, but I dont like this since it’s extra work compared to using the objectdatasource.

The code looks something like this.

<dx:ASPxGridView ID="ASPxGridView1" runat="server" 
    ClientIDMode="AutoID" 
    AutoGenerateColumns="False"
    KeyFieldName="UserId" 
    DataSourceID="ObjectDataSource1"
    ClientInstanceName="grid" 
    onhtmleditformcreated="AsPxGridView1HtmlEditFormCreated">

    <SettingsEditing PopupEditFormWidth="600" PopupEditFormModal="true" Mode="EditForm" />

    <Templates>
        <TitlePanel>
            <dx:ASPxButton ID="New" runat="server" Text="Ny användare" ClientInstanceName="New" AutoPostBack="false">
                <ClientSideEvents Click="function (s, e) { grid.AddNewRow(); }" />
            </dx:ASPxButton>
        </TitlePanel>

        <EditForm>
            First Name: <dx:ASPxTextBox ID="FirstName" runat="server" />
            <dx:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton" runat="server" />
            <dx:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton" runat="server" />
        </EditForm>
    </Templates>

    <Columns>
        <dx:GridViewDataTextColumn FieldName="UserId" VisibleIndex="0" />
        <dx:GridViewDataTextColumn FieldName="FirstName" VisibleIndex="2" />
        <dx:GridViewDataTextColumn FieldName="LastName" VisibleIndex="3" />
    </Columns>
</dx:ASPxGridView>

<asp:ObjectDataSource 
    ID="ObjectDataSource1" 
    TypeName="UserData" 
    SelectMethod="GetItems"
    UpdateMethod="ItemUpdate" 
    InsertMethod="ItemInsert" 
    DeleteMethod="ItemDelete"
    runat="server">
        <InsertParameters>
            <asp:Parameter Name="FirstName" Type="String"/>
        </InsertParameters>
</asp:ObjectDataSource>

And the UserData object

public class UserData
{
    public List<TblProUserData> GetItems()
    {
        var tblProUserData = new TblProUserData();
        tblProUserData.Fill();

        return tblProUserData.List;
    }

    public void ItemDelete(int userId)
    { }

    public void ItemUpdate()
    { }

    public void ItemInsert(string FirstName)
    {
        // This method gets called, but the FirstName is null.
    }
}

The problem is that the ItemInsert gets called, but the FirstName attribute is always null.

Is this a bug? is there a way around this? Did I miss something?

Thanks.

  • 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-05-25T06:09:50+00:00Added an answer on May 25, 2026 at 6:09 am

    It is necessary to use the Two-Way data-binding technique to bind template editors with DataItem’s fields:

    <dx:ASPxTextBox ID="FirstName" runat="server" Text='<%#Bind("FirstName")%>' />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have use AspxGridView which has FilterRow property. FilterRow property is working good in
I have an AspxGridView which has another aspxgridview in its detailrows. The second gridview
I have a ASPxGridView with a popup edit form which contains another ASPxGridView. When
I have an ASPXGRIDVIEW which is binded to an SQL query. I added to
I'm trying to add column to ASPxGridView which would have link to other page:
I have a custom edit form made for ASPxGridView but have a big problem
I have a page using ASPxGridView and to fill the GridView I use a
I have an ASPx Gridview control which displays a bunch of data. In the
I have a repeater control that repeats a DevExpress ASPxGridView for every item bound
I have a aspxgridview control from DevXpress. Is there a way to dynamically specify

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.