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
.aspx.cs
Any suggestions?
Regards
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