Removed customization from Edit, Delete cells when open any item to edit and change selection of drop down list on popup window

4 posts, 2 answers
  1. MK
    MK avatar
    29 posts
    Member since:
    Jul 2010

    Posted 05 Nov 2012 Link to this post

    please check below steps:
    1. we have removed edit/delete controls for some rows in ItemDatabouind event of the grid at the time of grid load.
    2. when we click on a add record button on Grid.

    3. popup window shows.

    4. that popup contains a dropdown box which postback to server.

    5. These removed controls still appearing in background when the pop-up comes up on front


  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Nov 2012 Link to this post

    Hi,

    I couldn't replicate the issue. I guess the Popup you are mentioning is the Insertform generated by the RadGrid. Please take a look into the following code snippet to hide the AutoGeneratedEdit/Delete column in ItemDatabound.

    C#:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            LinkButton editButton = (LinkButton)item["AutogeneratedEditColumn"].Controls[0];
            LinkButton deleteButton = (LinkButton)item["AutogeneratedDeleteColumn"].Controls[0];
            if (//your condition)
            {
                editButton.Visible = false;
                deleteButton.Visible = false;
            }
        }
    }

    Please provide the code if it doesn't help.

    Thanks,
    Princy. 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. MK
    MK avatar
    29 posts
    Member since:
    Jul 2010

    Posted 22 Nov 2012 Link to this post

    Hi,

    Thanks for your quick reply.

    This issue is happening where we use radgrid inbuild insert popup functionality & that inbuilt pop up has some drop down which does postback to the server then the background grid does not maintains the visible state for command items image.
    I am attaching screen shots of this issue so that it will elaborate more on this issue . Please have a look at the screen1 & screen2.

    I'm not able to attach any documation with this post!!!
  5. Answer
    Eyup
    Admin
    Eyup avatar
    3012 posts

    Posted 27 Nov 2012 Link to this post

    Hello Mahesh,

    I have created a sample RadGrid web site where I implemented the described scenario. On my side the buttons are preserved hidden on combo postbacks. Please check out the attached application and let me know about the result.

    Additionally, please note that no images were attached to your post.

    All the best,
    Eyup
    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.
Back to Top