BO's in webforms question


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I was just trying to reuse the existing form since it is so big. Using labels would require a new form, with well over 100 fields and lots of tedious layout. Lots of time.

If I can just set those two properties to TRUE or FALSE conditionally I am done.

Keith Chisarik

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
If this is the case, why not bind to a label? On the web especially, this can make this type of thing far easier to work with. I am just throwing some ideas out there.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
My need is actually for a HR person to be able to review a lengthy application. So the data should not be editable.

I use the same form as when the applicant does data entry for application review by HR staff, this saved (time and budget)having to create a PDF or report of the application, they just go to the app via a "special" link and the form knows to pull up the corret populated application for review and print. So I dont think I can allow the data to be changed.

Keith Chisarik

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Just FYI here Keith, we actually never do this online anymore (the read-only states I mean) when developing online apps. Instead of having two modes, we just let them type away which fires the IsDirtyChanged event which allows us to enable a Save button, etc. Would this work for you?
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K

As a workaround (to not having to do the more time consuming workaround above) I want to programatically set the

IgnoreManageUIReadOnlyState to True and the Readonly state to True, if the form is in "view mode" which results in the text being very readable, and not able to be changed by a user.

A SF web textbox renders as System.Web.UI.WebControls.TextBox even though it is MicroFour.StrataFrame.UI.Web.TextBox at design time.

Conversion attempts so I can get at the SF properties fail:

CType(ctrl, MicroFour.StrataFrame.UI.Web.TextBox).IgnoreManageUIReadOnlyState = True

I want to loop through all the controls on the form and set the properties as above, how to accomplish?

Setting them manualy in the code behind works, but I have like 100 controls and that is messy for maintenance.

Me.txtLastName.IgnoreManageUIReadOnlyState = True

Me.txtLastName.ReadOnly = True


Keith Chisarik

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
bump from 2006 Tongue

Is this on the radar at all ? I just got a newweb project and this was the first thing they commented on in the demo.

Keith Chisarik

Bastian Töpfer
Bastian Töpfer
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 32, Visits: 107
so.. will you do the extra rendering that is required to be able to change the disabled color?

I know this is not your top priority, but so far every client asked me if I can change the disabled color, because it is very hard to read on a lot of screens.

thanks for the update!

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah...sorry for the not so cheery answer Tongue
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
ewwww thanks.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, you are embarking upon the quest that we have battled from the beginning...Microsoft's inconsistent controls. Smile  Just do this, drop on a text box and play with the properties (Backcolor, ForeColor, etc) until you get the look you are going for.  Once this is done, just create your own textbox that inherits directly from the .NET control (not ours).  Then open up the SF source code, and look at the Web TextBox control.  Copy all of the guts out of this thing...in fact, you can copy this whole class and just rename the class to your new class...obviously in a different project than the SF source.

There is an interface property called BindingEditable.  The code inside of here is what managed the readonly state.  You will see that the code currently controls the Enabled property.  Place your code here...just keep in mind that the standard .NET control does not let you control the disabled background and foreground colors..thus the problem we have dealt with.  It basically will require us doing some rendering, which we just hve not taken the time to do, when the control is disabled.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search