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

hide griditem

2 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 31 Aug 2008, 07:49 PM
Hi,
I need to hide a GridItem and made this test.
But it's not working, why?
All GridItems is still visible!
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
        { 
            if (e.Item is GridDataItem) 
                e.Item.Visible = false; //(e.Item as GridDataItem).Visible = false;
        } 

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 01 Sep 2008, 05:00 AM
Hello Mattias,

You can try setting the Display property to False as shown in the code snippet to hide the items in the Grid.
cs:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            e.Item.Display = false
        } 
    } 

Princy.
0
Mattias
Top achievements
Rank 1
answered on 01 Sep 2008, 06:11 AM
Thank you Princy! :)
Tags
Grid
Asked by
Mattias
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mattias
Top achievements
Rank 1
Share this question
or