How to find control dynamically added in the header

A

Amit Chudasama

Pls any body tell me how can i find the control added in the following way :

Protected Overrides Sub OnItemDataBound(ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

Dim i As Integer

If e.Item.ItemType = WebControls.ListItemType.Header Then

For i = 0 To e.Item.Cells.Count - 1

e.Item.Cells(i).Text += "<BR><Input type=text class=FilterTextBox
runat=server id='txtcontrol" & i & "' ></input>"

Next

End If

End Sub

Now Tell me how can i find the txtcontrol(1...n) added in the header of each
column in code behind.
 
R

Raghavendra T V

Hi Amit,

I thinkyou can try

e.Item.FindControlByID [ or name] and mention the TextBox ID [ or name]

Thanks
Raghavendra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top