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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.09.2009, 11:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,538 / 847 (80) +++++++
Регистрация: 28.10.2006
mscrm4ever: CRM 4.0 Creating a Readonly picklist
Источник: http://mscrm4ever.blogspot.com/2009/...-picklist.html
==============

CRM Picklist control (HTML select tag) does not have a read-only attribute like other input html controls. The only way to make it read-only is to disable it which grays out the control completely. Once you disable the Picklist you can’t change its border or font color (i.e. make it look like a read-only field). The only way to achieve the functionality is to change the control behavior so each time the user tries to change the Picklist value the Picklist initial value is re-selected.

Here is the JS code that does the job:


function OnCrmPageLoad()
{
ReadOnlyPicklist(crmForm.all.);
}

function ReadOnlyPicklist(picklist)
{
picklist.savedIndex = picklist.selectedIndex;
picklist.onchange = function()

{
this.selectedIndex = this.savedIndex;
}
}

OnCrmPageLoad();



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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
CRM DE LA CREME! Configuring Microsoft Dynamics CRM 4.0 for Internet-facing deployment Blog bot Dynamics CRM: Blogs 0 18.08.2009 11:05
mscrm4ever: CRM 4.0 Setting a Picklist Default Value Blog bot Dynamics CRM: Blogs 1 20.07.2009 09:44
Microsoft Dynamics CRM Team Blog: Building Rich-Client Dashboards for Microsoft Dynamics CRM with Windows Presentation Foundation Blog bot Dynamics CRM: Blogs 1 31.03.2009 13:24
Microsoft Dynamics CRM Team Blog: List Web Part for Microsoft Dynamics CRM 4.0 Deployment Scenarios Blog bot Dynamics CRM: Blogs 0 30.01.2009 22:05
mscrm4ever: CRM 4.0 Supported Multi Select (Picklist) Control Blog bot Dynamics CRM: Blogs 0 25.12.2008 15:05

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

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

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