Hi,
I am trying the grid out to see if we want to use it in our application. So far it has looked pretty nice. However, I am running into an issue with the addRow call. When calling addrow it parses the comma delimited data and puts it into the individual columns. The problem I am running into is the following.
The first column in my table takes a link which looks similar to the following:
1
The whole string looks similar to
1,col2,col3
When addRow is called it sees the commas in the first column (link) and gets confused and parses out each piece as a new column. I have tried other methods (creating a JS array and passing it -> no data displayed, just blank rows, I’ve tried quoting the entire link field ->
Is it possible to change the parse delimiter for addRow?
TIA
- Mike
The addRow command has alternative syntax
grid.addRow(123,“1,2,3”);
or
grid.addRow(123,[“1”,“2”,“3”]);
When using second approach - any value can be used, includinng values with comma inside.
>>Is it possible to change the parse delimiter for addRow?
Yes,
grid.setDelimiter(“any_char”);
Another weird thing related to this:
If you have this in a column text: xxxx&yyyyy (just for example) it will cut off at the &.
But xxxx & yyyy
will work fine with spaces.
The browser (IE) threates any &nnn sequences as HTML entities
By default grid renders cell content as HTML, but you can change it to pure-text behavior, just use differnt column types
ro => rotxt
ed => edtxt
txt => txttxt
coro => corotxt
for such column types, special chars, as & < >, will be threated correctly.