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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.06.2010, 18:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,492 / 846 (79) +++++++
Регистрация: 28.10.2006
palleagermark: Coloring individual lines in an Enterprise Portal grid
Источник: http://palleagermark.blogspot.com/20...nterprise.html
==============

Here's the code you need in order to color individual lines in an Enterprise Portal grid. The example is carried out in the CustomerListGrid user control.

First add an event handler for data binding of the grid:

if (this.AxGridView1!= null)
{
this.AxGridView1.RowDataBound += new GridViewRowEventHandler(AxGridView1_RowDataBound);
}Next add the code controlling the logic of the coloring. In this case lines are colored "beige", if the currency of the customer is "USD":

void AxGridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
Microsoft.Dynamics.Framework.Data.Ax.DataSetViewRow dataRow = null;
string currencyCode;

if (e.Row != null && e.Row.RowType == DataControlRowType.DataRow)
{
dataRow = (Microsoft.Dynamics.Framework.Data.Ax.DataSetViewRow)e.Row.DataItem;
currencyCode = (string)dataRow.GetFieldValue("Currency");

if (currencyCode == "USD")
{
e.Row.BackColor = System.Drawing.Color.Beige;
}
}
}
I my personal opinion colored rows are disturbing to the eye, and I would prefer to add an icon to the lines which should have special attention. You can see how to do that on the ActivityListGrid user control.



Источник: http://palleagermark.blogspot.com/20...nterprise.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
palleagermark: Datasource names on Data Sets used for custom lookups on Enterprise Portal Blog bot DAX Blogs 0 05.02.2010 15:05
palleagermark: Important limitation in Enterprise Portal deployment Blog bot DAX Blogs 0 28.01.2010 15:05
palleagermark: Data Set lookups on Enterprise Portal (EP) Blog bot DAX Blogs 0 20.12.2009 11:06
palleagermark: Manage Enterprise Portal deployments Blog bot DAX Blogs 0 10.10.2008 14:05
Solutions Monkey: Enterprise Portal Screencasts at Channel9.msdn.com Blog bot DAX Blogs 6 01.07.2008 19:38

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

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

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