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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.01.2015, 11:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
mscrmblog: Add a double click event handler to a Subgrid in CRM 2013
Источник: http://mscrmblog.net/2015/01/13/add-...d-in-crm-2013/
==============

Had an interesting problem we had a middle entity that linked two other entities together however we didn’t really want people to get to that entity when double clicking on the row in the grid.

Use the following function and you can override the double click event.

function OverrideDoubleClickClientsGrid() { if (document.getElementById("ClientGrid")) { var grid = document.getElementById("ClientGrid"); grid.ondblclick = function () { var gridControl = document.getElementById("ClientGrid").control; var selectedClientOutletId = ""; for (var rowNo = 0; rowNo < gridControl.get_selectedRecords().length; rowNo++) { selectedClientOutletId = gridControl.get_selectedRecords()[rowNo].Id; } if (selectedClientOutletId != "" && selectedClientOutletId != null) { alert(selectedClientOutletId); // You can add your logic in here and open the other record in the same window. // for example based on the selected id, retrieve it, get the lookup entity and open that entity form //Xrm.Utility.openEntityForm(entityName, entityId) } }; } else { setTimeout("OverrideDoubleClickClientsGrid();", 1000); }}



Источник: http://mscrmblog.net/2015/01/13/add-...d-in-crm-2013/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2013 Update Rollup 2 Blog bot Dynamics CRM: Blogs 0 15.04.2014 01:15
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15

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

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

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