hi people!
i wanna rebind my RadGrid after updating data to database, everything works well except that the RadGrid cant rebind data after the action completed, here is my source code.
protected DataClasses1DataContext context = new DataClasses1DataContext();
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
{
if ((item["Name"].FindControl("Name") as Label).Text == "Action")
{
var group = (from g in context.Groups where g.Name == "Action" select g).Single();
group.Note = "note!";
context.SubmitChanges();
item.Enabled = false;
}
}
// i cant call back Rebind() method in RadGrid here because RadGrid does not allow while databinding
}
i wanna show my data that has been updated in this event but havent still found out the ways to do it yet.
anyone can handle this problem please help me to fix it.
thanks in advance.
kind regards.
i wanna rebind my RadGrid after updating data to database, everything works well except that the RadGrid cant rebind data after the action completed, here is my source code.
protected DataClasses1DataContext context = new DataClasses1DataContext();
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
{
if ((item["Name"].FindControl("Name") as Label).Text == "Action")
{
var group = (from g in context.Groups where g.Name == "Action" select g).Single();
group.Note = "note!";
context.SubmitChanges();
item.Enabled = false;
}
}
// i cant call back Rebind() method in RadGrid here because RadGrid does not allow while databinding
}
i wanna show my data that has been updated in this event but havent still found out the ways to do it yet.
anyone can handle this problem please help me to fix it.
thanks in advance.
kind regards.