Hi Bruno,
I have a problem using renderChunk. I don't have a problem with the actual rendering of the output, which works just fine. But every time I'm interacting with the list (eg. sorting) the rows in the grid are saved again, but with the additional markup I've added for output.
As a simple example, I did a chunk, that renders a text-field ("field_1") in bold:
Then I added 2 rows to the grid. In the first row field_1 == 'Example 1', in the 2nd row "Example 2". After that, I re-ordered the rows using the drag&drop interface leading to the contents of field_1 being altered to "<b>Example 1</b>" and "<b>Example 2</b>" respectively.
After I repeated that a few times, my field_1 contents lookes like this "<b><b><b><b><b>Example 1</b></b></b></b></b>". So here's my question. How can I just format the output in a row, without altering the content?
What I'm actually trying to do is to have a user id saved in a data field, but the corresponing user's full name displayed in the grid. I've already searched for hours, and that very question came up a couple of times, but I just can't find a solution to that problem.
Thank you,
Erik
Here's my configuration:
{
"formtabs":[
{
"MIGX_id":1,
"caption":"Caption",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":1,
"field":"field_1",
"caption":"Feld 1",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"text",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"[]",
"inputOptionValues":"",
"default":""
}
]
}
],
"contextmenus":"",
"actionbuttons":"",
"columnbuttons":"",
"filters":"[]",
"extended":{
"migx_add":"",
"formcaption":"",
"update_win_title":"",
"win_id":"testtv",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"",
"classname":"",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":2,
"header":"Feld 1,2 (renderChunk)",
"dataIndex":"field_1",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderChunk",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"<b>[[+field_1]]<\/b>",
"renderoptions":"[]"
},
{
"MIGX_id":1,
"header":"Feld 1, 1",
"dataIndex":"field_1",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"[]"
}
]
}