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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:45:12+00:00 2026-06-05T11:45:12+00:00

I need to create Excel like control using Telerik RadGrid – dynamic size of

  • 0

I need to create Excel like control using Telerik RadGrid – dynamic size of columns and rows, in line editing. My problem is that, when I try to call update command on edited row in return it has old values only.

My RadGrid control:

<telerik:RadGrid runat="server" ID="rgDataSheet" AutoGenerateColumns="true" AllowSorting="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
    AllowMultiRowEdit="true" AllowPaging="false" EnableViewState="false" OnNeedDataSource="HandlerGridOnNeedDataSource"
    OnItemUpdated="GridItemUpdated" OnInsertCommand="GridInsertCommand" OnUpdateCommand="GridUpdateCommand"
    OnCancelCommand="GridCancelCommand">
    <MasterTableView runat="server" EditMode="InPlace" NoMasterRecordsText="brak rekordów"
        ShowHeadersWhenNoRecords="true" AllowCustomSorting="false" EnableColumnsViewState="false"
        AllowSorting="false" AllowFilteringByColumn="false" TableLayout="Fixed">
        <Columns>
            <telerik:GridEditCommandColumn UpdateText="Update" EditText="Edit" CancelText="Cancel" />
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowClick="RowClick" />
    </ClientSettings>
</telerik:RadGrid>

My events:

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<string> datakeynames = new List<string>();

            dataSet = new DataSet();
            dataSet.Tables.Add(new DataTable());
            dataSet.Tables[0].Columns.Add("col0"); 
            dataSet.Tables[0].Columns.Add("col1"); 
            dataSet.Tables[0].Columns.Add("col2"); 
            dataSet.Tables[0].Columns.Add("col3"); 
            dataSet.Tables[0].Columns.Add("col4"); 
            dataSet.Tables[0].Columns.Add("col5"); 

            dataSet.Tables[0].Rows.Add(new object[] { "1", "11", "a", "q", "z", "n" });
            dataSet.Tables[0].Rows.Add(new object[] { "2", "12", "s", "w", "x", "m" });
            dataSet.Tables[0].Rows.Add(new object[] { "3", "13", "d", "e", "c", "," });
            dataSet.Tables[0].Rows.Add(new object[] { "4", "14", "f", "r", "v", "h" });
            dataSet.Tables[0].Rows.Add(new object[] { "5", "15", "g", "t", "b", "y" });
            ViewState["dataSet"] = dataSet;
            rgDataSheet.MasterTableView.DataKeyNames = new string[] { "col0", "col1", "col2", "col3", "col4", "col5" };
        }
        else
        {
            rgDataSheet.Rebind();
        }
    }

protected void HandlerGridOnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        dataSet = (DataSet)ViewState["dataSet"];
        ((RadGrid)sender).DataSource = dataSet;
    }

protected void GridUpdateCommand(object source, GridCommandEventArgs e)
    {
        //here I try access changed values, in example -
        //GridEditableItem editedItem = e.Item as GridEditableItem;
        //editedItem.OwnerTableView.DataKeyValues -> it contains always old values
    }
  • 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-05T11:45:14+00:00Added an answer on June 5, 2026 at 11:45 am

    Please remove below code from your page_load event.It is not needed Radgrid Automatically manage this thing. for more info. please check below link. http://www.telerik.com/help/aspnet-ajax/grid-advanced-data-binding.html

    else
        {
            rgDataSheet.Rebind();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Excel sheet with two columns and I need to create new
I need to create excel sheet from my Java code which contains charts like
I need to create an excel file via C#. I have read a few
I need to create an excel sheet with a field status. It is a
I need to create a VBA Macro in Excel. The task is that when
I need to create a component on a web page to import an excel
I need to create a list of random numbers between two bounds in Excel.
I need to create an array from a list of data in excel. The
I'm generating an excel file using Apache POI 3.8 , and have the need
I'm trying to create a dynamic report in Excel. I have lots of sales

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.