AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: База знаний и проекты
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 06.03.2007, 00:33   #1  
Blog bot is offline
Blog bot
Участник
 
25,538 / 847 (80) +++++++
Регистрация: 28.10.2006
axaptapedia: Tutorial Form MultiSelectCheckBox
Источник: http://www.axaptapedia.com/Tutorial_...SelectCheckBox
==============

Summary: see also + category
== A tutorial about MultiSelect with CheckBox in a form ==

[http://www.axaptapedia.com/images/4/...ctCheckBox.xpo download xpo]

=== Preview ===
[[Image:Screen.PNG]]

=== Description ===
Sometimes, simply selecting the lines you want in a datasource and pressing OK (or other button) is not enough for the users.
They want to clearly see what they have selected, be able to easily modify the selecting, and to their liking whould be to see a checkbox on the left of the grid for each line.
(For an example, see CustTransOpen form where you mark transaction with a checkbox)

Here is a simple tutorial form based on InventTable datasource.
You can select multiple lines and process the lines by pressing ''Process lines'' button.


The code in the form is commented. So it will be easy for anyone to understand the way it works
Here is the extract of the comments I think you should definitely read: (ClassDeclaration)
1. A set of strings is used in the example, because ItemId is a primaryKey field
2. Easiest is to use a RecId set, but in this case you have to create a RecId index on the table (see prop. CreateRecIdIndex) to speed up processing of selected lines
3. Notice that AllowEdit is enabled on the DataSource, but prohibited on all the fields. This is to allow editing of the edit-method.

And: (in the ProcessLines method on the form)
This method should not be implemented on the form and is merely here to avoid creating another object for the example
The processing should be implemented on a server based class
To pass the selected lines to the class for processing use the pack method of the set object, itemIdSet.pack()
This will create a container that you will pass on to the class. Then you unpack the container into a Set object
Set processLinesSet = Set::create(_packedSet), where _packedSet is the passed container

=== See also ===
[[Multiple_grid_selections]]

[[Category:Form development]]


Источник: http://www.axaptapedia.com/Tutorial_...SelectCheckBox
За это сообщение автора поблагодарили: alex55 (1).
Теги
axapta, map, multiselect, set, tmp, маркировка, полезное, производительность, скорость, тестирование

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: Validate field values on form Blog bot DAX Blogs 0 17.12.2008 12:05
axaptapedia: Tutorial Form Dynalink Blog bot DAX Blogs 0 22.08.2007 23:00
Kashperuk Ivan: Dynamics AX Tutorials - Tutorial 2 - Classes\Box Blog bot DAX Blogs 0 25.04.2007 22:23
Axapta Lessons: Trapping keystrokes in a Form Blog bot DAX Blogs 13 01.11.2006 18:16
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:07.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.