Hide Update button after update in row

5 posts, 0 answers
  1. Mohamed El-Sayed
    Mohamed El-Sayed avatar
    33 posts
    Member since:
    Apr 2009

    Posted 11 Mar 2013 Link to this post

    i want to hide the update button if the row was updated ,
    just want to update one time only
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Mar 2013 Link to this post

    Hi,

    Try the following code to achieve your scenario.
    C#:
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
     {
            if (e.CommandName == RadGrid.UpdateCommandName)
            {
               LinkButton updateButton = (LinkButton)e.Item.FindControl("UpdateButton");
                updateButton.Visible = false;
            }
    }

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mohamed El-Sayed
    Mohamed El-Sayed avatar
    33 posts
    Member since:
    Apr 2009

    Posted 11 Mar 2013 Link to this post

    an error appear in the attachment
    <telerik:GridEditCommandColumn EditText="Confirm"
                                     FilterControlAltText="Filter EditCommandColumn column">
                                 </telerik:GridEditCommandColumn>
  5. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 14 Mar 2013 Link to this post

    Hi Mohamed,

    I am not completely sure which button you want to hide the edit button or the update button. I prepared a small sample where I demonstrates how to hide the edit button if the row has been previously updated. Basically I saved the previously updated rows in the ViewState and accordingly OnPreRender event I hide them. Give it a try and let me know about the result.

    Kind regards,
    Kostadin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Mohamed El-Sayed
    Mohamed El-Sayed avatar
    33 posts
    Member since:
    Apr 2009

    Posted 14 Mar 2013 Link to this post

    Thanks Kostadin :)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017