How do I navigate through records using drag 'n' drop controls?

O

Oberon

How do I navigate through records using drag 'n' drop controls?

I have an example in C# for Windows forms that relies on
BindingContext but this is not available for ASP.NET. How do I solve
that problem?

PS: I don't need a code example showing me how to do it without drag
'n' drop because I already know how. I WANT to learn how to do it with
drag 'n' drop.

Suppose I have a form in which I want to display records with two
textboxes: txtID and txtName, two buttons 'Last' and 'Next'. My
database record has an key field: myID which is an integer Identity
field and a varchar field called myName.

I already have the sqlConnection, sqlDataAdaptor, DataSet and
DataView. Let's call them connMine, daMine, dsMine and dvMine.

I set the properties of each textbox to a relevant field from the
DataView, dvMine. I'm not worried about what to do when the Last and
Next click events loop around to the first and last records; I can
deal with that. I just need an example of drag 'n' drop database
controls with navigation. There must be one somewhere?

For instance with a windows form I can bind records simply with the
code:

private void frmMain_Load(object sender, System.EventArgs e)
{
this.daMine.Fill(this.dsMine,1,0,"EgTable");
}

private void cmdNext_Click(object sender, System.EventArgs e)
{
// Move to next record.
this.BindingContext[this.dsMine,"EgTable"].Position++
}

What code substitues in ASP.NET Page_Load() and cmdNext_Click()?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top