03.09.2009, 17:18 | #1 |
Участник
|
Container in Grid
I have problems while showing the content of the container in the grid.
My datasource has two field. First field is the id of type string and the second of type container. You can answer in Russina. |
|
03.09.2009, 18:23 | #2 |
Участник
|
Which problems do you have?
Stack trace or just wrong displaying?
__________________
http://www.axdevposts.blogspot.com Пришел, уведел.... отойди, дай другому увидеть! |
|
|
За это сообщение автора поблагодарили: Kent (1). |
04.09.2009, 11:01 | #3 |
Участник
|
I have problem with displaying. Axapta tray display it as image and I got an error. That is the problem.
I have code: I collect data from ListView and insert it in container, and container I post in table. 'Field' have extended data type "Container". X++: container con; Set set = new Set(Types::String); ; idx = ListSelected.getNextItem(FormListNext::All); while (idx != -1) { item = ListSelected.getItem(idx); set.add(item.data()); idx = ListSelected.getNextItem(FormListNext::All, idx); } con = [set.pack()]; table.Field= con; table.insert(); Последний раз редактировалось Kent; 04.09.2009 в 11:05. |
|
04.09.2009, 12:19 | #4 |
Участник
|
This is not a problem - system doesn't know how to display your container, that's why it populates it it the tree view.
This is redundant: X++: con = [set.pack()]; table.Field= con; X++: table.Field= set.pack(); If you want to display selected items in grid, you will have to create child table and join it with parent using specified key. Child table will contain records with selected list view items. Also you can display rows, creating another list view or tree view, depending on what you need. If you describe the purpose of displaying container in grid in detai, solution can be more obvious
__________________
http://www.axdevposts.blogspot.com Пришел, уведел.... отойди, дай другому увидеть! |
|
04.09.2009, 12:36 | #5 |
Участник
|
I don't use child table, because I have more ListViews with different data. Example, I select 3 rows from ListView 1, and example 1 row from ListView2. And than I get in table following:
X++: id Field 1.....................Field2 1 ListView1<field> 2 ListView1<field> 3 ListView1<field> 4..................................ListView2<field> Maybe are different way to solve this? Последний раз редактировалось Kent; 04.09.2009 в 12:38. |
|
04.09.2009, 12:52 | #6 |
Moderator
|
May be convert your container to string with using function Global::con2str? And then use display method for showing result string in grid. Before showing result string can be arranged with some additional chars, just like LF, CR etc.
|
|
04.09.2009, 12:52 | #7 |
Участник
|
You can provide table with the next structure:
Field 1 - Type of list view (enum), for instance, ListView1, ListView2 Field 2 - Value (string) - selected item text
__________________
http://www.axdevposts.blogspot.com Пришел, уведел.... отойди, дай другому увидеть! |
|
04.09.2009, 13:00 | #8 |
Участник
|
Thank You plumbum and Gustav. I will try this ways.
|
|
Теги |
container, grid |
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|