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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2013, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
tlefor: Dynamics AX 2012: How Wide is my Grid Column?
Источник: http://blogs.msdn.com/b/tlefor/archi...id-column.aspx
==============

So you want to know about column sizing?

You'd think the sizing of a column in a grid would be a fairly straightforward task. In Dynamics AX2012... it is, as you shouldn't ever have to care as the Dynamics framework implements a pretty sophisticated algorithm to attempt to size the columns in the grid to effectively show your data. If you're reading this blog post you are obviously among a very few select human beings.

1) You are enough of a nerd that you want to know how Dynamics AX sizes its columns, only because you want to know all there is to know about Dynamics AX.

2) You stumbled upon this post looking for something else, and you aren't sure why you are still reading this.

3) You are a friend or family member and you are being polite and reading this because I sent you a link.

4) You actually have a problem to solve and can't understand why your changes aren't effective in sizing the grid columns.



If number 1 or 4 apply to you, continue reading, otherwise you have my permission to go walk the dog.



How does it work?

Both the developer/customizer and the end user have the power to explicitly size columns, but without intervention, the Dynamics AX grid control will actually inspect the data that it is about to show, and size the column to make sure that most/all of the data is visible. That's right... the grid will size columns dynamically depending upon the data. If that wasn't enough... if the size of the column isn't wide enough to show the corresponding label... then it will also take that into account. For example if all of the data in a column were a Two -Character US State abbreviation such as "CA" then the grid would initially set it's size to 2 characters wide. However, it also looks at the column label... say for example "State." The grid also accommodates the label and ensures that the grid column width is wide enough to show the label as well. So, in this case the width of a "state" column would be 5 characters wide. As a developer, if you are authoring a control, you can override the algorithm that looks at the data by setting an explicit size on the EDT or Control associated with the data. However, min/max and label will still govern the size. That is, you cannot set an explicit width of 3 characters for a state and expect it to be 3 characters wide, as the grid layout engine will apply the min/max/label rule and make the column 5 characters wide. The assumption is that there isn't a scenario, where by default you want to show a column that is 0 characters wide, nor wider than the maximum width nor one with an truncated label. In the end, the end user is the one who may overrule all. It's his screen, he gets to decide if he needs a description column 20 characters wide, 40 characters wide or 80 characters wide. He does so by simply and interactively sizing the column and it will be "remembered" from session to session.

The following flow chart attempts to explain the algorithm. That's all for now. You may go walk the dog.












Источник: http://blogs.msdn.com/b/tlefor/archi...id-column.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

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

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

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