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

DataGrid Header skip

2 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wicus
Top achievements
Rank 1
Wicus asked on 23 Jul 2008, 06:54 AM
Hi Guys,

Can any1 tell me how to set my rad grid to skip the skip the Item Header and Item Footer on the ItemCommand Server side event

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 23 Jul 2008, 07:06 AM
Hi Wicus,

I am not sure whether this is what you want. Here I have implemented two LinkButtons in the CommandItemTemplate to hide the Header and Footer in a Grid.

ASPX:
<CommandItemTemplate> 
   <asp:LinkButton ID="LinkButton1"  CommandName="SkipHeader"  Text="Skip Header" runat="server"></asp:LinkButton> 
    <asp:LinkButton ID="LinkButton2"  CommandName="SkipFooter"  Text="Skip Footer" runat="server"></asp:LinkButton> 
    </CommandItemTemplate> 

CS:
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
    {  
       if (e.CommandName == "SkipHeader")  
        {  
            RadGrid1.MasterTableView.ShowHeader = false;  
        }  
        if (e.CommandName == "SkipFooter")  
        {  
            RadGrid1.MasterTableView.ShowFooter = false;  
        }  
     } 


Regards
Princy.
0
Wicus
Top achievements
Rank 1
answered on 23 Jul 2008, 07:17 AM
Thanks...it works now...thanks alot
Tags
Grid
Asked by
Wicus
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Wicus
Top achievements
Rank 1
Share this question
or