thanks Scott, it helped me .
"Scott Allen" wrote:
> Hi Shiju:
>
> See my article here:
>
http://odetocode.com/Articles/116.aspx >
> The code is in C#, but you should be able to find a technique to use
> from the description and code, which includes finding controls in a
> grid footer and header. The trick is this: the Items collection only
> contains data bound items, for the header and footer you need to look
> in the Controls collection.
>
> HTH,
>
> --
> Scott
>
> On Fri, 23 Jul 2004 22:21:03 -0700, "Shiju Poyilil"
> <ShijuPoyilil@discussions.microsoft.com> wrote:
>
> >How to find a control in the datagrid footer ?
> >
> >In my code below, I am trying to hide a label named lbl1 on the basis of a selected vlaue(value="test") of the dropdownlist ,both the dropdownlist and the label are in the footer of the datagrid.
> >
> >An advice on where I am going wrong,would be highly appreciated
> >
> >For Each datagriditem In dg1.Items
> > Dim str as string="test" 'this gives the value of selected item from the dropdown list in the footer
> > If datagriditem.ItemType = ListItemType.Footer Then
> > Dim lbl As New Label
> > lbl = CType(datagriditem.FindControl("lbl1"), Label)
> > If str = "test" Then
> > lbl.Visible = False
> > End If
> > End If
> >Next
> >
> >
> >
> >Rgds
> >Shiju
>
> --
> Scott
>
http://www.OdeToCode.com