search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Detailsview without a SqlDataSource

Asked by Anonymous
11 years ago.

In the tutorial code on http://www.daypilot.org/tutorial-calendar-sqlserver.html the detailsview has a sqldatasource with select-, update- and insertcommands.
My question, how can implement this replacing the sqldatasource with a collection of classes?

Answer posted by Dan Letecky [DayPilot]
11 years ago.

You can use ObjectDataSource instead. See also:

http://stackoverflow.com/questions/1735096/using-a-detailsview-without-sqldatasource

Alternatively, you can replace DetailsView with individual controls. This is a little bit more work:

1. You should manually create an input control for each field you want to update, e.g. TextBox1, TextBox2, etc. Add also the buttons for Save and Close.

2. On popup display (before ModalPopup.Show();), you need to load the record and manually set the control values, e.g. TextBox1.Text = row.Text;

3. In Save.Click handler, read the control values, update the DB row and call ModalPopup.Hide();

Comment posted by Anonymous
11 years ago.

Thank you

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.