:: DHX Grid :: <input> tag's attribute order gets changed.

Hi there,

When I try to set the cell’s value through setValue() like following, it gets added to the respected cell.

libTableGrid.cells(libTableGrid.getSelectedId(),3).setValue("ttttt<input type=“image” alt=“1” size=“1” value=“47504” src=“htmlarea/images/footnote.gif” title=“47504” order=“1” /> ")


when I try to get value through getValue() of that same cell, I get following.


If you observe, the attributes of input tag gets reShuffled which creates problem

Why the type attribute got shuffled ???

Please help into this.

Grid doesn’t store original HTML value provided for the cell, it is injected inside HTML page and browser may affect it.
In above case browser ignores unknown attribute , so it is missed.

Grid can store and retrieve plain values, but in case of HTML formated values - they will be rendered in grid correctly ( according to HTML rules ) , but result of getValue against such cell depends on browser.

Hi there,

Please see that attributes are not missed out but they have got shuffled.


Is there some way to sort this issue ?

Unfortunately there is no way to sort this problem because of order of html attributes depends on the browser.