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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 21.11.2009, 22:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Ruslan Goncharov: SysTableBrowser instant field navigator
Источник: http://rusgon.blogspot.com/2009/11/s...navigator.html
==============


Without any doubt AX SysTableBrowser is very useful tool which helps to watch on content of exploring table. Unfortunately as for me there is one essential fault. When table contains large number of fields using SysTableBrowser sometimes it's hard to find out
a. which column corresponds to particular field; and
b. using horizontal scroll bar it's difficult to "catch up" needed field.

I must confess that using of scroll bar is inconvenient very match in case when table has a dozen and more fields.

Figure 1 demonstrates lack of information of column's headers (checkbox fields).


Figure 2 illustrates disambiguation between fields RemainSalesPhysical and RemainSalesFinancial (SalesLine Table).
The simpliest way is to reach needed field is Tab button. Pressing Tab user may find needed field at the end. But if there is necessity to find another one field user has to repeat Tab-pressing another one time. And another one time. And another one time...
Take a look at Axapta Object Tree (AOT) especially at \Data Dictionary\Tables\Table\Fields node. It's easy to watch on full range of fields and move from one field to another, isn't it?
Let's combine SysTableBrowser and Table\Fields node into one window.
SysTableBrowser tool this is a conjunction of SysTableBrowser Class and SysTableBrowser Form. I decided not to touch SysTableBrowser Class and following modification this is a modification of SysTableBrowser Form only.
1. Open SysTableBrowser Form Design and add FormTreeControl TreeControl like this:


Set Left Property to Right edge.
Set Height Property to Column height.

2. We need to create new fillTree() method: // GRR fields navigator --> void fillTree() { int _i; FormDesign Ctrl = element.design(); FormControl _buildCtrl; FormControl _formControl; TreeItemIdx treeItemIdx; ImageListAppl_Aot ImageListAppl_Aot; FormTreeItem item; DictField dictField; fieldId fieldId; int i,j; int fieldCnt; #DictField #resAppl ImageRes findOverlayImage(Types _type) { ImageRes imageRes; switch(_type) { case Types::STRING, Types::VARSTRING : return #ImageOverlayString; case Types::ENUM: return #ImageOverlayEnum; case Types::REAL: return #ImageOverlayReal; case Types::DATE: return #ImageOverlayDate; case Types::INTEGER: return #ImageOverlayInteger; case Types::DATETIME: return #ImageOverlayTime; case Types::CONTAINER: return #ImageOverlayContainer; default: return 0; } return imageRes; } ; // Find 'Grid' object --> for(_i=1; _i<span class="sy0">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 21.11.2009, 22:13   #2  
mazzy is offline
mazzy
Участник
Аватар для mazzy
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
29,472 / 4494 (208) ++++++++++
Регистрация: 29.11.2001
Адрес: Москва
Записей в блоге: 10
интересная мысль.

X++:
            if (bitTest(dictField.flags(), #DBF_STORE))
            {
                for(j = 1;j <= dictField.arraySize(); j++)
                {
                    treeItemIdx = SysFormTreeControl::addTreeItem(formTreeControl, dictField.name(), 0, null, imageListAppl_Aot.image(#ImageField));
                    SysFormTreeControl::setOverlayImage(formTreeControl, treeItemIdx, imageListAppl_Aot.image(findOverlayImage(dictField.baseType())));

                    itemIdxContainer += treeItemIdx;
                }
            }
Жаль только он проверяет только на "хранимость" в базе.
Жаль, что не проверяет права доступа к полям.
__________________
полезное на axForum, github, vk, coub.
Старый 22.11.2009, 02:48   #3  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
Thumbs up
Что ж наш парсер блогов постоянно теряется при встрече кода?

К основной строке сообщения парсер так и не дошел:
Цитата:
Who interested in another modificated SysTableBrowser take a look at Kashperuk's DEV SysTableBrowser


На самом деле, интересное с точки зрения пользователей решение.
Более того, оно не требует переоткрытия формы.
У меня есть похожий режим в DEV_SysTableBrowser (Custom fields), но он требует переоткрытия формы (так работает TableBrowser). А в АХ 2009 с этим что-то напортачили - я еще не смотрел толком, что сломали.

Руслан, спасибо за свежую мыслю.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Ruslan Goncharov: A few words about sorting codes Blog bot DAX Blogs 0 18.02.2009 21:05
Ruslan Goncharov: Storing report design in database Blog bot DAX Blogs 0 27.08.2008 18:05
Ruslan Goncharov: Dynamic enabled() property for StringEdit and arrows Blog bot DAX Blogs 0 18.04.2008 20:05
Ruslan Goncharov: How to clarify what happened with variables in AX Blog bot DAX Blogs 0 17.01.2008 15:40
Ruslan Goncharov: Lorenz attractor Blog bot DAX Blogs 0 09.01.2008 22:50

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 22:24.