Sorting Not working for link cells

Am intializing the grid using the below lines of code and binding the value to cells using the loadXMLString method from the server response. For each cell we have provided the link and on the click of every we are calling the javascript method for that we have added ahref tag for evry cell but when we perform the sorting on click of column header the sorting is not working only sort image in the header is changed and the values are not sorted.

Grid Intialization Code:-
documentGrid = new dhtmlXGridObject(‘documentsGrid’);
documentGrid.setImagePath("…/App_Themes/Basic/Images/");
documentGrid.setHeader(“Type,Subtype,Description,Party,Executed,Contract Date,Corresp. Date,Page / Size,BarCode”);
documentGrid.setColTypes(“link,link,link,link,link,link,link,link,link”);
documentGrid.setColSorting(“str,str,str,str,str,date,date,int,str”);
documentGrid.setInitWidths(“65,73,110,93,60,65,65,46,73”);
documentGrid.setColAlign(“left,left,left,left,center,center,center,center,center”);
documentGrid.setColumnColor("#ffffff,#ffffff,#ffffff");
documentGrid.entBox.onselectstart = function () { return true; }
documentGrid.enableMultiline(true);
documentGrid.setColHidden(“false,false,false,false,false,false,false,false,false”);
documentGrid.enableTooltips(“false,false,false,false,false,false,false,false,false”);
documentGrid.setOnRowCreated(rowCreatedResults);
documentGrid.objBox.style.overflow = “hidden”;
documentGrid.objBox.style.width = “650px”;
documentGrid.hdrBox.style.width = “650px”;
documentGrid.enablePaging(true, 25, 10, ‘recinfoArea’, true);
documentGrid.enableAutoHeight(true);
documentGrid.enableAutoWidth(true);
documentGrid.setPagingSkin(“toolbar”);
documentGrid.init();

Server Side XML Writing:-

                    writer.WriteStartElement("cell");
                    StringBuilder sbTitle = new StringBuilder();
                    sbTitle.Append("<a onclick=\"DocumentLoad(");
                    sbTitle.Append(intDocumentId);
                    sbTitle.Append(",");
                    sbTitle.Append(projectId);
                    sbTitle.Append(");\" style=\"cursor:hand;color:Blue\">");
                    sbTitle.Append(Name);
                    sbTitle.Append("</a>");
                    writer.WriteCData(sbTitle.ToString());
                    writer.WriteFullEndElement();

Please help me to solve the sorting issue.

Thanks
Vinoth

Can you provide example of xml which you are generating for the grid?