Print Page | Close Window

Read Only Property with button functionality

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=7318
Printed Date: 27 November 2024 at 7:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Read Only Property with button functionality
Posted By: LittleJK
Subject: Read Only Property with button functionality
Date Posted: 06 June 2007 at 5:02pm
Hi can there be a way to set an item to being readOnly = true and still have the in place button inside that item still fire? we are trying lock down the item so it forces the user to make all the changes in a popup fired by the button.

Thanks



Replies:
Posted By: Oleg
Date Posted: 07 June 2007 at 1:29am
Hi,
 
You can remove ItemHasEdit flag from Item.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Fossil
Date Posted: 07 June 2007 at 11:17am
What we tried was Item.Flags=Not ItemHasEdit and that added a Expand Button to the Item.  What I am doing is setting the forecolor of both the caption and value to gray text color and in request_edit setting cancel to true.  Which seems to work.  Did you mean something else?


Posted By: Oleg
Date Posted: 08 June 2007 at 1:22am
Its also nice solution.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: apuhjee
Date Posted: 12 July 2007 at 11:51am
Oleg -
What would this logical syntax look like in C#?  Obviously the compiler is not happy with item.Flags = !(PropertyItemFlags.ItemHasEdit);
 
I would like to make all property items read-only without changing their visual appearance (item.ReadOnly dims the item).
 
Thanks ~ jp
 
EDIT:  Not too sure if this is a clear way of doing it... but item.Flags = 0; did what I wanted it to


Posted By: Oleg
Date Posted: 13 July 2007 at 5:49am
Hi,
 
Yes, you need Item.Flags = 0.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net