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

[Solved] hiding an item in grid

4 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kunmuni
Top achievements
Rank 1
Kunmuni asked on 26 Jun 2009, 12:35 PM
Hi,
I want to make an item invisible, based on certain attributes of it. Is it possible in the grid? For example if the item is marked as deleted don't show it on grid. The actual delete is performed after certain user actions. Please let me know if any solution is available other than maintaining two list one actual list with and one list for View.

Thanks you
Kunmuni

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Jun 2009, 03:10 PM
Hi Kunmuni,

In order to achieve the desired functionality I suggest that you review the following online demo illustrating a similar scenario.
Client-side Inline Delete

I hope this helps.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kunmuni
Top achievements
Rank 1
answered on 26 Jun 2009, 03:46 PM
Client side inline delete does not really solve my problem. I need to do post back to do other actions without actually deleting the item in the source. So the item needs to be hidden in the grid.
0
Pavlina
Telerik team
answered on 29 Jun 2009, 11:15 AM
Hello Kunmuni,

To hide the items in the Grid, you can try setting the Display property to False on ItemDataBound/PreRender event as shown in the code snippet bellow:
C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)    
    {    
        if (e.Item is GridDataItem)    
        {    
            e.Item.Display = false;    
        }    
    } 

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kunmuni
Top achievements
Rank 1
answered on 29 Jun 2009, 02:38 PM
Thank you. It worked.
Tags
Grid
Asked by
Kunmuni
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Kunmuni
Top achievements
Rank 1
Share this question
or