ASP .Net with C#(want to disable edit button of the gridview control after updating record only once)
<p>Hello Please anyone help me for,
I want to make a program through which gridview edit command button disable once i update the record.
I have Drop-downlist control and through selection of which gridview display data. While after updating a row in gridview i have error like  that "Argument Exception was handled by user code and as <strong>Flag is neither a DataColumn nor a DataRelation for table DefaultView.</strong>"</p>

<p>in .cs file i written in the gridview1_rowdatabound event as </p>

<pre><code>switch (e.Row.RowType)

{

            case DataControlRowType.DataRow:


                DataRowView myDataRowView = (DataRowView)e.Row.DataItem;
                if (Convert.ToInt32(myDataRowView["Flag"]) &gt; 0)
                {
                    LinkButton EditLink = e.Row.FindControl("LinkEdit") as LinkButton;
                    if (EditLink != null)
                    {
                        EditLink.Visible = false;
                        //EditLink.Enabled = false;

                    }
                }

                break;
        }
</code></pre>

<p>Flag is the my column value in database. After updating row in gridview its value becomes change and depends on them i can disable edit link for that perticular row of gridview. But i receive above error.</p>
