troubleshooting Question

MVC property binding question

Avatar of soozh
soozhFlag for Sweden asked on
Web FrameworksAJAX
1 Comment1 Solution627 ViewsLast Modified:

I am an old Delphi/intraweb programmer that is now project leading an MVC project.

In this project we have an underlying database and some simple forms that are used to modify the database tables.  For example we have a Users Form and a Users table.

In the Users Form its possible to create new, modify and delete users.   We have a set of commands (New, Modify, Save, Delete, Regret) as buttons.  The states of these buttons changes depending on the state of the form.

Its not so complicated.  For example when the user opens the form the New button is enabled, but the others are disabled.  When the user selects an existing record the the Edit button is enabled.  Fairly standard stuff!

In my Delphi days I would connect the command buttons state (enabled or disabled) to the state of the underlying dataset.

So for example when it was empty only the New button was enabled.  And when it contained data then the Modify button would be enabled.  The button states were directly bound to the state of the underlying dataset.

In the MVC application my programs say that they must write some javascript to handle the button states and there must be other server side code to handle the dataset.

My wish is that we use ajax calls for the onClick events of the command buttons so that all of the logic can be placed server side and hopefully the button states can be bound to the dataset.

Is this possible?  Are the any ways of binding visible control properties to dataset status - or any other property for that matter?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros