Greetings,
Ok, so I'm doing an insert into my grid via itemcommand, and here is the code.
In there, my mAdminManager.InsertStatus(mStatus) does add the data into my database, and once the page refreshes, the grid rebinds and displays the data. The problem is, once the page does it's postback, the insert textbox is still visible. Is there a way to kick the grid out of insert mode?
Thanks.
Ok, so I'm doing an insert into my grid via itemcommand, and here is the code.
case "PerformInsert": |
rgdStatusList.Columns.FindByUniqueName("Active").Visible = true; |
rgdStatusList.Columns.FindByUniqueName("Archived").Visible = false; |
AddStatus(e); |
break; |
protected void AddStatus(Telerik.Web.UI.GridCommandEventArgs e) |
{ |
Telerik.Web.UI.GridEditableItem insertItem = e.Item.OwnerTableView.GetInsertItem(); |
//e.Item as Telerik.Web.UI.GridEditableItem; |
Status mStatus = new Status(); |
AdminManager mAdminManager = new AdminManager(); |
//Pull in all needed info to create a new record in the database. |
mStatus.StatusDescription = (insertItem["StatusDescription"].Controls[0] as TextBox).Text; |
mStatus.Active = (insertItem["Archived"].Controls[0] as CheckBox).Checked; |
mStatus.CommunityID = ParentKNPage.CoPID; |
try |
{ |
mAdminManager.InsertStatus(mStatus); |
} |
catch (Exception ex) |
{ |
rgdStatusList.Controls.Add(new LiteralControl("Unable to insert Status. Reason: " + ex.Message)); |
} |
} |
In there, my mAdminManager.InsertStatus(mStatus) does add the data into my database, and once the page refreshes, the grid rebinds and displays the data. The problem is, once the page does it's postback, the insert textbox is still visible. Is there a way to kick the grid out of insert mode?
Thanks.