Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ravi Gopalani on Jun 03, 2009 00:41
open dhtmlx forum
attachHeader in dhtmlxGrid

Hi !
I am trying to detach and then attach header.After detaching the header and then attaching,I am not able to see the attach header.Below is the code :
myGrid.loadXML{
URL,
function(){
myGrid.detachHeader(1);
var subheaderString="<span title="This is the compensation based view of Bookings which is not
the same as the reporting view. It takes into consideration your compensation plan. It also uses the booking date of the original
order to determine the time period and plan it should be associated with."></span>,<span title="My Comm Bookings that have not yet hit revenue.">Bookings (USD)</span>,<span title="Your revenue attainment based on your compensation plan. It is used to calculate commission payments.">My Comm Bookings</span>,<span title="">My Non Comm Bookings</span>,<span title="">My Comm Backlog</span>,<span title=" ">My Comm Revenue</span>";

myGrid.attachHeader(subheaderString,"left,right,right,right,right,right");
});
Please tell me what exactly the mistake I am doing.


Thanks;
Ravi Gopalani
Answer posted by Support on Jun 03, 2009 02:10
There is a syntax problem with your code 
          var subheaderString="<span title="This
double quotes used for all string and inside the string as well - in result string can't be correctly parsed by javascript
To solve problem just replace surrounding quotes with single ones.

var subheaderString='<span title="This is the compensation based view of Bookings which is not the same as the reporting view. It takes into consideration your compensation plan. It also uses the booking date of the original order to determine the time period and plan it should be associated with."></span>,<span title="My Comm Bookings that have not yet hit revenue.">Bookings (USD)</span>,<span title="Your revenue attainment based on your compensation plan. It is used to calculate commission payments.">My Comm Bookings</span>,<span title="">My Non Comm Bookings</span>,<span title="">My Comm Backlog</span>,<span title=" ">My Comm Revenue</span>'