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 8100309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:42:31+00:00 2026-06-05T22:42:31+00:00

I am trying to emulate another form that the other developer here created. In

  • 0

I am trying to emulate another form that the other developer here created. In the DevExpress gridview, he added a new row button to the filter row, rather than to each row. I figured out how to do that by copying the custom button into the appropriate place in the filter row.

My question is how do I add the functionality to it? I found the addnewrow() method in the documentation, but it required a DataTable() class that I couldn’t figure out how to get. Can you help me? I just started working with your ASPxGridView control today so this is all new to me.

Here is some of the code I found for adding a new row on DevExpress’s gridview. But it feels like I am on the wrong track. And my first question about it is where do I find the DataTable class? Is there a simpler way to do this?

DataTable GetTable()
    {
        //You can store a DataTable in the session state
        DataTable table = Session["Table"] as DataTable;
        if (table == null)
        {
            table = new DataTable();

            DataColumn colid = table.Columns.Add("ID", typeof(Int32));
            DataColumn nameid = table.Columns.Add("Name", typeof(String));
            table.PrimaryKey = new DataColumn[] { colid };
            colid.ReadOnly = true;

            for (int i = 0; i < 23; i++)
            {
                DataRow aRow = table.NewRow();
                aRow["ID"] = i;
                aRow["Name"] = String.Format("Name{0}", i);

                table.Rows.Add(aRow);
            }
            Session["Table"] = table;
        }
        return table;
    }
    protected void grid_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxGridView grid = sender as ASPxGridView;

        DataTable table = GetTable();
        table.Rows.Add(new Object[] { e.NewValues["ID"], e.NewValues["Name"] });

        Session["Table"] = table;

        e.Cancel = true;
        grid.CancelEdit();
    }
  • 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-05T22:42:32+00:00Added an answer on June 5, 2026 at 10:42 pm

    You should get a bit of general knowledge before you do this. Look here for data binding explanation and here for ASPxGridView editing demos. Storing data in session (like in sample you found) is rarely a way to go.
    As for add new row you can use ASPxClientGridView.AddNewRow client side method. So, assign ClientInstanceName to your ASPxGridView (e.g. grid1) and call grid1.AddNewRow() on button click event – ASPxButton.ClientSideEvents.Click.

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

Sidebar

Related Questions

I am trying to emulate the multiple upload files in html form that looks
I'm trying to emulate Xcode's ⌘-R keystroke in another editor (namely, Vim); I thought
We are trying to emulate a device that runs off a parallel port. We
I'm trying to emulate the behavior of this drag n drop found here How
I've added a paragraph system component in my template, trying to emulate the Geometrixx's
Hi i was trying to emulate a post created from javascript in a site
I'm trying to emulate the LIKE operator in LINQ to Objects. Here my code:
I'm trying to emulate what growl does with an app that I have. At
I am trying to emulate a click on a basic link that appears like
I am trying to emulate dice using ImageView. When I click the button, nothing

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.