30.12.2010, 08:12 | #1 |
Участник
|
kamalblogs: Creating Edit methods for DS that don’t allow editing in Dynamics ax
Источник: http://kamalblogs.wordpress.com/2010...n-dynamics-ax/
============== Let’s say we have a Datasource and it is being displayed in the grid. The user has to choose one of it to further proceed. The use case is that you must be able to use a checkbox to select the records but you should not be able to modify rest of the information. Technical implementation: First Thought: Set allow create, allow delete allow edit property on the ds as false. Consequence: when you set allow edit as false you will no more be able to edit the checkbox also which is undesired. Second Thought: Set allowedit false control wise either in the ds or in the formcontrol. Consequence: Too much work/customization. If done at formcontrol level the user can even add a field through the syssteupform and start editing it (Refer here for details: http://wp.me/p298V-2IL) Best Approach: Set allow edit to true in the ds . Override the write method in the ds and comment the super. Consequence: Peaceful solution public void write(){ ; I4C_InventTrans_ds.reread(); I4C_InventTrans_ds.refresh(); //super();} Источник: http://kamalblogs.wordpress.com/2010...n-dynamics-ax/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|