DataNavigateUrlFormatString

M

Mike P

Does anyone know if you can pass multiple column parameters in the
DataNavigateUrlFormatString for grids?

My current code is like this and works for a single parameter:

<asp:HyperLinkColumn
DataTextField="DTOG1"
DataNavigateURLField="DTOG1"

DataNavigateUrlFormatString="javascript:var
NewWin=window.open('digit_translation.aspx?DTOG1={0}',null,'width=800,he
ight=200,top=100,left=100,scrollbars=no,directories=no,status=no,toolbar
=no,resizable=no');"
HeaderText="DTOG1" />


Any help would be much appreciated.


Cheers,

Mike
 
J

Joshua Flanagan

I posted a solution to this problem in this very same thread.... its called:
"Use multiple fields for DataNavigateUrlFormatString SOLUTION!"

You need to use a Template column, which isn't a big deal, unless you need
to create the column programmatically. However, my solution referenced
above will let you create the column programmatically.
 
Joined
Oct 10, 2008
Messages
1
Reaction score
0
Field = new BoundField();
da = new HyperLinkField();
da.DataTextField = "DeviceAddr";
da.HeaderText = "Device ID";
string sa = dbtAvaRoom.SelectedItem.ToString();
da.DataNavigateUrlFields = new string[] { "DeviceAddr" };
da.DataNavigateUrlFormatString = "pop.aspx?id= {0}" ;
Col = da;
GridView1.Columns.Add(Col);
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top