setting a column to a link breaks update

Questionssetting a column to a link breaks update
Scott Pratt asked 12 years ago

I have a column -primary key- set to display the id as a link to another column. -filename. That all works fine.

The problem is, when I try to update a field in a row, it builds the query with the html for the link instead of the id of the column.

The query generated is wrong. UPDATE myDb.myTable SET title='My new title etc…' WHERE sid = 'a href='http://localhost/mydir/?id=S11001.r1.tcw' S11001/a'

NOTE: I had to remove the lt and gt symbols wrapped around the start and stop of the a tags in order to avoid the "invalid characters" message generated by your forum sw.

Of course there is no sid = to the html for the link. So the update won't work.

Query should based on the original column id:

UPDATE myDb.myTable SET title='My new title etc…' WHERE sid = 'S11001'

1 Answers
Abu Ghufran answered 12 years ago

Hello,

Currently there is a limitation that first column cannot be a link.
Alternate solution is to alias first column (e.g. id) with another field in select sql (link_id).
then make first column editable: true, hidden: true … and link_id as editable:false, hidden:false, with link formatter.

This is quickest way around i have in mind.
Regards,

Your Answer

10 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?