Forums: [SOLVED] Readonly field on list page during inline edit mode - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Readonly field on list page during inline edit mode Rate Topic: -----

#1 User is offline   abdemir 

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 16-December 05

Posted 09 July 2018 - 01:31 PM

Hi,

I need user based field control inline edit mode (readonly or not), however until now I could not success with below two codes. If will be happy if you help me please.

ROLES
Sales Rep. : Warehouse and Delivery fields should be ReadOnly.
Sales Manager: No restriction (ReadOnly) on Warehouse and Delivery fields.

FIED NAMES
Warehouse (combo)
Delivery (textbox)

FIRST SOLUTION; (please see attached result file)
1) List View > Before Display
If session("myRole") = "Sales Rep" Then
pageObject.readOnlyFields("Warehouse")
End If

SECOND SOLUTION;
2) List View > Javascript
var ctrlWH = Runner.getControl(pageid,'Warehouse');
if (myAuth=='Sales Rep')
{
ctrlWH.makeReadonly();
}

Snippet Area:
Response.write "<script> window.myAuth = '" & Session("myRole") & "'</script>"



Note: Session("myRole") is defined during login process.
ASPRunner version 9.1


Screenshot pictures;
https://ibb.co/iUjx98
https://ibb.co/dfy2bo
0

#2 User is online   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15833
  • Joined: 03-February 03

Posted 09 July 2018 - 04:10 PM

On List page all fields are readonly. If you need to change inline edit page behaviour you need to add your code to Edit page events.
Best regards,
Sergey Kornilov
0

#3 User is offline   abdemir 

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 16-December 05

Posted 09 July 2018 - 05:18 PM

Javascript solution worked on edit events. thank you.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic