Column header cannot be parsed through a variable string

If we try to implement header by using the syntax below:


instead of :

it does not give desired results, but even parses text aligning parameters as col headers too . How to give a variable string into “attach header” command instead of typing the whole string there?

Please, try to use the following:

var headerString = "A,B,C"; var styles = ["text-align:right;","text-align:left;","text-align:center"]; mygrid.attachHeader(headerString,styles);