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

[Solved] ‎access hidden rows control -

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Senthil
Top achievements
Rank 1
Senthil asked on 11 Jun 2008, 10:26 AM

 In rad Grid when set property item.Expanded=flase,

  the visibility of the row getting false.

i nedd to access the controls inside the row which was collapsed(invisible) using javascript

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jun 2008, 11:17 AM
Hi Senthil,

Are you trying to access controls placed inside the ItemTemplate of a GridTemplateColumn? Here is the sample code snippet which shows how to access a Label control placed inside a template column.

ASPX:
 <rad:GridTemplateColumn HeaderText="TempCol" UniqueName="TempCol" > 
    <ItemTemplate> 
       <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
    </ItemTemplate> 
   </rad:GridTemplateColumn> 
   

CS:
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
  {  
      if (e.Item is GridDataItem)  
      {  
          GridDataItem item = (GridDataItem)e.Item;  
          Label lbl = (Label)item["TempCol"].FindControl("Label1");  
      }  
   } 


Thanks
Princy.
Tags
Grid
Asked by
Senthil
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or