cancel
Showing results for 
Search instead for 
Did you mean: 

LinkToURL in table

Former Member
0 Kudos

Hi,

can anyone help me try out something?

I implemented a linkToURL in a SAPTable in VS. But instead of setting reference in designer I need to set it in the code, like:

LinkToURL1.Reference = "test.newPage";

If i do this outside table it works fine, but inside nothing happens..

Anyone had the same issue?

Regards,

Simon

PS: using PDK.NET2.0

Message was edited by: Simon Andreassen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Simon,

This could be an issue of where you do this code. Do you use DataBinding to fill the table? Or did you fill using the "add items" designer? How (and where in the code) did you add the link controls? In case of DataBinding, are you doing this in page_load or in ItemDatabound event?

Regards,

Ofer

Former Member
0 Kudos

Hi Ofer,

I use the designermode and create datasets and bind them to table.

I put the code both in Page_Load and _LeadSelect.

The LinkToURL was added after setting datamember and datasource, like an extra field in table in designermode.

Regards,

Simon

Former Member
0 Kudos

Hi Simon,

Since you are doing everything in designer mode, and using databinding, It's best to bind the reference of the LinkToUrl also in design time. You can have elaborate bindings defined....

If you can't for some reason, (since the URL is not in the data or something), try to put the "setting of the reference" code in the ItemDatabound event of the table. this event happens for each visible row of the table when after it's databound, and it's THE place to manually edit properties of controls and cells in a databound table (due to binding operations order, Page_load handler is too soon).

Regards,

Ofer

Former Member
0 Kudos

Hi Ofer,

I solved it using javascript, I'll look into your suggestion later.

I'm using LeadSelect and e.Row in my solution, but I recon it has same functionality in ItemDataBind event..

Thanks for all the help.

Regards,

Simon

Answers (0)