Yes WebMatrix..
For example by doing (For the first Cell!!):-
e.Item.Cells(1).Attributes.Add("onmouseover",
"this.style.backgroundColor='#DDEEFF'")
e.Item.Cells(1).Attributes.Add("onmouseout",
"this.style.backgroundColor='white'")
Enjoy
Patrick
"WebMatrix" wrote:
> Thanks for the prompt reply. I think yoiur code will work for highlighting.
> One more question; in this ItemCreated event, can I access a value of a
> specific column?
> Thank you!
>
> "Patrick.O.Ige" wrote:
>
> > Yep try using ItemCreated like below:-
> >
> > Sub MenuGrid_ItemCreated(ByVal sender As Object, ByVal e As
> > System.Web.UI.WebControls.DataGridItemEventArgs) Handles MenuGrid.ItemCreated
> > If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
> > ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.SelectedItem
> > Then
> > e.Item.Attributes.Add("onmouseover",
> > "this.style.backgroundColor='beige';this.style.cur sor='hand'")
> > e.Item.Attributes.Add("onmouseout",
> > "this.style.backgroundColor='white';")
> > End If
> > End Sub
> >
> > Hope it helps!!
> > Patrick
> >
> >
> >
> > "WebMatrix" wrote:
> >
> > > Hello,
> > >
> > > I need to extend functionality of ASP.NET datagrid. Onmouse over, the whole
> > > row needs to be highlighted. OnClick highlighted color must remain, and the
> > > value of one of the columns must be set to innerHTML property of a <div> tag
> > > (no postBack).
> > > Has anyone done anything like that?
|