Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raghu on Oct 17, 2008 05:52
open dhtmlx forum
Sorting

Hi,
How to sort the link type columns on the client side
Answer posted by Support on Oct 17, 2008 06:22
If you have specified it as "link" column type and using raw data in XML - it can be sorted as any other columns ( str sorting type will work correctly )
If you have used inline link tags - you need to use custom sorting routine.
function str_custom(a,b,order){  
 a = a.replace(/<[^>]*>/gi,"")
 b = b.replace(/<[^>]*>/gi,"")
  if (order=="asc")
  return (a>b?1:-1);
  else
  return (a>b?-1:1);
}