Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nancy on Apr 10, 2008 06:53
open dhtmlx forum
How to insert link for column header

I need to insert hyperlink for column header. I have done something like this. But it throws me syntax errors. I think it is syntax problem in passing parameters.Below is the code:

pn="Patient Name"

Response.Write "<script type=""text/javascript"">"
 Response.Write "var i='<?xml version=\""1.0\"" encoding=\""UTF-8\""?><rows >"

Response.Write "<column width=""100"" type="txt""align=""left"" color=""white"" sort=""na"">" & _
        "<![CDATA[<a href=""javascript:Sort("""& pn &""","""& ASC &""")& pn  &"</a>]]></column>"

Response.write "</rows>';"

Please let me know whether the syntax of passing parameters is correct

Answer posted by Support on Apr 10, 2008 07:56
Answer posted by Nancy on Apr 10, 2008 22:53
The sample given in the link is for static xml but i want the syntax for dynamic xml. For static xml code works fine but for dynamic it is not. Please suggest me the syntax
Answer posted by Support on Apr 11, 2008 01:48
There is no difference between static and dynamic XML, while your ASP code build the string in the same format grid will treate incoming data exactly the same ( it doesn't matter is xml static or dynamic if it has correct structure and served with correct content type )
Answer posted on Apr 11, 2008 02:48
Please tell me the whether syntax used by me is correct? If so why am I getting errors? Please suggest
Answer posted by Support on Apr 11, 2008 02:51
Please provide the exact response generated by your ASP code
Answer posted by Nancy on Apr 11, 2008 04:20
Invalid Argument
Answer posted on Apr 11, 2008 06:14
Please suggest the syntax ASAP
Answer posted by Nancy on Apr 13, 2008 23:59
I have tried all possible ways. But I am not successful. Please help me out.
Answer posted by Stanislav on Apr 14, 2008 06:15
I'm not pretty sure, but the next line
  "<![CDATA[<a href=""javascript:Sort("""& pn &""","""& ASC &""")& pn  &"</a>]]></column>"
probably need not be written as
  "<![CDATA[<a href=""javascript:Sort("""& pn &""","""& ASC &""")" & pn  &"</a>]]></column>"