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

Problem Updating values in grid

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arnold Guzmán
Top achievements
Rank 1
Arnold Guzmán asked on 22 May 2010, 04:23 AM
Hello,

I'm designing a grid editing the individual records "InSite", using a Edit/Update-Cancel button, after push Edit Button, the row becames editable and I change some values, but when I push "Update" the labels  are still showing the original values, they don't change at all.
This is my simplest code:


.aspx
<telerik:RadGrid runat="server"  ID="RadGrid1" 
        OnNeedDataSource="RadGrid1_NeedDataSource" 
        AutoGenerateColumns="false" 
        AllowAutomaticUpdates="false" 
         > 
        <MasterTableView EditMode="InPlace"
            <Columns> 
                <telerik:GridBoundColumn DataField="Id"/> 
                <telerik:GridBoundColumn DataField="Name"/> 
                <telerik:GridEditCommandColumn /> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 

.aspx.cs

class Entity{ 
        private int _id; 
        public int Id { 
            get { return _id; } 
            set { _id = value; } 
        } 
 
        private string _name; 
        public string Name{ 
            get { return _name; } 
            set { _name = value; } 
        } 
    } 
 
    public partial class _Default : System.Web.UI.Page 
    { 
        private List<Entity> _list = new List<Entity>(){  
                new Entity(){ Id=1, Name="A Name" },  
                new Entity(){ Id=2, Name="Another Name" }, 
                new Entity(){ Id=3, Name="Pacman"
            }; 
 
        protected void Page_Load(object sender, EventArgs e){ } 
 
        protected void RadGrid1_NeedDataSource(object source,  Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
        { 
            RadGrid1.DataSource = _list; 
        } 
    } 


Any suggestions?

Regards

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 26 May 2010, 01:46 PM
Hi Arnold,

Please check out the following online documentation articles which explain how to update items in the RadGrid:

http://www.telerik.com/help/aspnet-ajax/grdupdatinginplaceandeditforms.html
http://www.telerik.com/help/aspnet-ajax/grdinsertupdatedeleteatdatabaselevel.html

I hope this helps.

Best wishes,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Arnold Guzmán
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or