Attributes.Add() for DataList

S

Steve Klett

I know this is the DataGrid forum, but there is no DataList and this is the
closest thing. Hope that's cool.

Basically... it appears to be impossible to add additional attributes to a
DataList (IE: onMouseOver)
The DataListItem.Attributes.Add() method doesn't complain, it adds the
strings to the collection but they aren't rendered out. I wondered if
anyone here had a work around. The DataGrid is not an acceptable workaround
because it does not have a <SelectedItemTemplate>

I know I can catch the selected item in the bound event, but I haven't had
success adding a new control and binding it. So for now, the DataList is my
boy..... kinda, just need to get some DHTML going and for that.. I need to
add attributes.

Any help greatly appreciated!

Thanks,
Steve
 
A

Alvin Bruney

what is your argument to your add function?
it should be attributes.add("onmouseover","script here");
or alternatively attributes["onmouseover"] = "script here";

regards
 
S

Steve Klett

that is correct. both of those have been tried.
I am fine with the syntax, I have used Attributes with the datagrid w/our
problem, it is the DataList that is the problem.

Thanks,
SK


Alvin Bruney said:
what is your argument to your add function?
it should be attributes.add("onmouseover","script here");
or alternatively attributes["onmouseover"] = "script here";

regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
Steve Klett said:
I know this is the DataGrid forum, but there is no DataList and this is the
closest thing. Hope that's cool.

Basically... it appears to be impossible to add additional attributes to a
DataList (IE: onMouseOver)
The DataListItem.Attributes.Add() method doesn't complain, it adds the
strings to the collection but they aren't rendered out. I wondered if
anyone here had a work around. The DataGrid is not an acceptable workaround
because it does not have a <SelectedItemTemplate>

I know I can catch the selected item in the bound event, but I haven't had
success adding a new control and binding it. So for now, the DataList
is
my
boy..... kinda, just need to get some DHTML going and for that.. I need to
add attributes.

Any help greatly appreciated!

Thanks,
Steve
 
A

Alvin Bruney

did you figure this out or get help on it?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
Steve Klett said:
that is correct. both of those have been tried.
I am fine with the syntax, I have used Attributes with the datagrid w/our
problem, it is the DataList that is the problem.

Thanks,
SK


Alvin Bruney said:
what is your argument to your add function?
it should be attributes.add("onmouseover","script here");
or alternatively attributes["onmouseover"] = "script here";

regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
Steve Klett said:
I know this is the DataGrid forum, but there is no DataList and this
is
the
closest thing. Hope that's cool.

Basically... it appears to be impossible to add additional attributes
to
need
 
S

Steve Klett

nope, nothing yet.


Alvin Bruney said:
did you figure this out or get help on it?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
Steve Klett said:
that is correct. both of those have been tried.
I am fine with the syntax, I have used Attributes with the datagrid w/our
problem, it is the DataList that is the problem.

Thanks,
SK


message news:[email protected]...
what is your argument to your add function?
it should be attributes.add("onmouseover","script here");
or alternatively attributes["onmouseover"] = "script here";

regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
I know this is the DataGrid forum, but there is no DataList and this is
the
closest thing. Hope that's cool.

Basically... it appears to be impossible to add additional
attributes
to haven't
had DataList
is need
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top