protected void uiGridViewLayout_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeleteLayout") { try { CardLayouts objData = new CardLayouts(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString())); objData.MarkAsDeleted(); objData.Save(); CurrentTxt = null; BindCardTxt(); } catch (Exception ex) { return; } } }