In my itemdatabound event I realized there is a
"Header" Item. Here is how I assign a CssClass to
whatever column was clicked. (Couldn't figure out how
to walk the control tree):
Private Sub Repeater1_ItemDataBound(ByVal sender
As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs)
Handles Repeater1.ItemDataBound
'we want to underline the column names because
we sort by them
'find the control and assign a Css class
If e.Item.ItemType = ListItemType.Header Then
Select Case Session("SortBy")
Case "S"
Dim linkStyle As LinkButton
linkStyle =
CType(e.Item.FindControl("lnkStyle"), LinkButton)
linkStyle.CssClass = "clicked"
Case "N"
Dim linkStyle As LinkButton
linkStyle =
CType(e.Item.FindControl("lnkNames"), LinkButton)
linkStyle.CssClass = "clicked"
Case "D"
Dim linkStyle As LinkButton
linkStyle =
CType(e.Item.FindControl("lnkDates"), LinkButton)
linkStyle.CssClass = "clicked"
End Select
End If
--- Karen Kungowski <[EMAIL PROTECTED]> wrote:
>
> Thanks Dean (and Peter). I will do some poking
> around
> and follow up here on the answer (or bug you
> somemore:)
>
>
>
> --- Dean Fiala <[EMAIL PROTECTED]> wrote:
>
> >
> > Getting called out, huh? :) Actually I answered
> > something very similar
> > to this quite a few months back. Take a hunt
> > through the group
> > archives. If you can't find it, let me know and
> > I'll look around
> > later tonight and send out a detailed response.
> The
> > trick lies in
> > reading through the control tree under the grid,
> you
> > can get to
> > everything through there.
> >
> > --
> > Dean Fiala
> > Very Practical Software, Inc
> > http://www.vpsw.com
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > --------------------~-->
> > Make a clean sweep of pop-up ads. Yahoo! Companion
> > Toolbar.
> > Now with Pop-Up Blocker. Get it for free!
> >
>
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
> >
>
--------------------------------------------------------------------~->
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
> >
> >
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $4.98 domain names from Yahoo!. Register anything.
>
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/saFolB/TM
>
--------------------------------------------------------------------~->
>
>
>
> Yahoo! Groups Links
>
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
>
> [EMAIL PROTECTED]
>
>
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/