Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > dataGrid - link - popup window

Reply
Thread Tools

dataGrid - link - popup window

 
 
popsovy@rusmex.com
Guest
Posts: n/a
 
      02-03-2004
I need to create a datagrid where the column headers (not the items) are links. When a user clicks on a link, it brings up a popup window.

I guess the question is how to make the headers to be URLs but without using sorting, then associate client-side javascript to these headers.... or, is there a better way?

Many thanks for your help.

Zhenya
http://www.rusmex.com
 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      02-03-2004
Headers are cells too. In your itemcreated event handler trap for the header
cell and then add a link to the header. It's similar to adding a webding.
You may want to google for webding datagrid sort for a clearer picture. Here
is one approach.
if(e.item.itemtype == listitemtype.header)
{
linkbutton l = e.item.cells[0].controls[0];
link.navigateurl = "<script> goes here to open up a popup
}

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I need to create a datagrid where the column headers (not the items) are

links. When a user clicks on a link, it brings up a popup window.
>
> I guess the question is how to make the headers to be URLs but without

using sorting, then associate client-side javascript to these headers....
or, is there a better way?
>
> Many thanks for your help.
>
> Zhenya
> http://www.rusmex.com



 
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
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
window.createPopup has a link in the popup, but this link is not clickable Jiong Feng Javascript 1 05-15-2004 09:42 AM
Click link in popup window and insert link text in a field of mother window BlueŽ Javascript 4 09-27-2003 05:18 PM



Advertisments