This is a migrated thread and some comments may be shown as answers.

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

3 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MK
Top achievements
Rank 1
MK asked on 05 Nov 2012, 01:19 PM

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


3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 06 Nov 2012, 05:53 AM
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. 
0
MK
Top achievements
Rank 1
answered on 22 Nov 2012, 02:37 PM
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!!!
0
Accepted
Eyup
Telerik team
answered on 27 Nov 2012, 09:36 AM
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.
Tags
Grid
Asked by
MK
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
MK
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or