?
Solved

Trouble getting a FormView to update with a Dataset datasource

Posted on 2008-10-23
3
Medium Priority
?
959 Views
Last Modified: 2013-12-17
I have a Formview control that is databound to a dataset.  When I click on the "Update" button, it appears that there is no way to access the bound data or I'm just not seeing it.  I am handling the _ItemUpdating event.  Given my control name is FormView1, how can I get to the databound fields and their data?
0
Comment
Question by:jvalescu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:WanaBRich
ID: 22785814
What do you want to do? for instance do you want to change a 1 or 0 in the DB to desplay "yes" or "no"

0
 

Author Comment

by:jvalescu
ID: 22786554
I have an Order Entry form with an Order Entry Header table and an Order Details table.  The user adds a new header record by filling in some textboxes and hitting "Save", creating the Order Header record and returning an Order ID.  This is the related key to the Order Details table.  Since there is no data in the Order Details table at this time, I could not get a FormView or GridView to populate.  Messing around with the EmptyDataTemplate for both didn't work out at all (ex. The FormView would show the fields, but when I hit "Edit", it did nothing.)  So I decided to do things "manually"; create a blank record in a dataset and use it as the Datasource for the Formview.  This worked OK.  I could even edit the record.  Now, when I hit "Update" to commit my changes, I want to be able to pull the data from the FormView dataset and commit them to the SQL database.  Sounds cludgy, but it was very frustrating.  So that's the long answer to your short question, unless you have a better idea...........................  Thanks!
0
 
LVL 6

Accepted Solution

by:
WanaBRich earned 1500 total points
ID: 22786665
You could put a defalut record in the Order Details table that has a ID of 1 lets say. You could populate that table with some thing like "No details available yet" Then when you create the first new header you can manually put in the default ID of 1 then you can chech to see if the ID = 1 on a edit and if it does then created a new record and replace the FK with the correct ID.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question