Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Attributes.Add() for DataList

Reply
Thread Tools

Attributes.Add() for DataList

 
 
Steve Klett
Guest
Posts: n/a
 
      11-18-2003
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


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-18-2003
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" <(E-Mail Removed)> wrote in message
news:e##(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Steve Klett
Guest
Posts: n/a
 
      11-18-2003
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" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:e##(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      11-30-2003
did you figure this out or get help on it?

--
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
"Steve Klett" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:e##(E-Mail Removed)...
> > > 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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Steve Klett
Guest
Posts: n/a
 
      12-04-2003
nope, nothing yet.


"Alvin Bruney" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> did you figure this out or get help on it?
>
> --
> Regards,
> Alvin Bruney
> Got Tidbits? Get it here
> www.networkip.net/tidbits
> "Steve Klett" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote

in
> > message news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > > news:e##(E-Mail Removed)...
> > > > 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
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering DataList EditItemTemplate from Outside of the DataList Luis Esteban Valencia ASP .Net 1 01-06-2005 07:32 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd ASP .Net 1 05-26-2004 04:07 AM
DataList in DataList acko bogicevic ASP .Net 2 11-11-2003 08:31 AM
Datalist in Datalist How? Gönen EREN ASP .Net 0 08-22-2003 02:41 PM



Advertisments