Delete Row using Viewstate(Session)

        DataTable dt = (DataTable)ViewState["CurrentTable2"];
        if (dt.Rows.Count > 1)
        {
            dt.Rows.RemoveAt(e.RowIndex);
            dt.AcceptChanges();
            grvrisk.DataSource = dt;
            grvrisk.DataBind();

        }
        else
        {
            Response.Write("Add value");
        }

Comments

Popular posts from this blog

Find Country from URI

Encrypt and Decrypt text using alphabet shifting method

How to Call Stored Procedure