ASP.NET 2.0 Gridview values change in cell - row specific javascri

  • Thread starter Thread starter Phil Johnson
  • Start date Start date
P

Phil Johnson

Hi,

I need to have a column in a gridview that cycles through a set of comma
delimited values

i.e. if you imagine a column where in one row the value might be "111,222"
and in the next row it might be "111,222,333,444".

Instead of displaying the whole string, I need to split the string by the
comma delimeter and show each value long enough so that every value will be
cycled through in a minute. So if there are 2 values they will display for
30 seconds each. If there are 4 values they will display for 15 seconds each.

I am happy that I could write javascript to do this on a page with one comma
delimmited values, but I am unsure of where to start based on a cell in a row
in a gridview.

Has anybody done anything similar, or know where to put the code to do this?

I think the RowDataBound event could be a good starting point, but how do I
tie javascript in to the values in a specific row and change a cell in a row?

Any thoughts would be appreciated.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
 
Hi,


First of all you should post this question in the ASPNET NG, there you will
get better answer.

Now, there are several ways you could do this. You have to use a timer in
JS, this will call a function that is the one doing the work. This function
needs to know what and where to change. what to change could be stored in a
hidden field (works if there is only one cell with this feature). where to
change could be done the same way. you could store the ClientID of the
control that will host the cell (can be either a <span> or a <div> ) and you
will use Document.All to find it and change it as needed.
 

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

Back
Top