Information générale
Catégorie:
The Mere Mortals .NET Framework
OK. I am getting closer to making this work!
Remaining problems:
1) The MoveAll and RemoveAll buttons work fine, but the Move and Remove buttons are not moving amything
2) When I put the MoverControl on an mmMaintenance form it displays the items in the left and right pane, but when I put the MoverControl on an mmBusinessForm the two panes are blank, however the MoveAll and RemoveAll buttons still move the invisible items between the available and selected sources.
Any ideas?
Setup:
// Tables
ProjectList and FtPoMast_Base are physical tables
// Windows Form Designer generated code
this.ProjectMover.AvailableListBindingSource = "ProjectList";
this.ProjectMover.AvailableListBindingSourceDisplayMember = "ftpomast_base.BIDNUMBER";
this.ProjectMover.AvailableListBindingSourceValueMember = "ftpomast_base.BIDNUMBER";
this.ProjectMover.AvailableListBindingValueSource = null;
this.ProjectMover.AvailableListBindingValueSourceMember = null;
this.ProjectMover.Name = "ProjectMover";
this.ProjectMover.ParentBusinessObject = null;
this.ProjectMover.SelectedListBindingSource = "ProjectList";
this.ProjectMover.SelectedListBindingSourceDisplayMember = "ProjectList.bidnumber";
this.ProjectMover.SelectedListBindingSourceValueMember = "ProjectList.bidnumber";
this.ProjectMover.SelectedListBindingValueSource = null;
this.ProjectMover.SelectedListBindingValueSourceMember = null;
// Business Object
namespace FT.MRP.Business
{
public class ProjectList : ABusinessObject
{
public DataSet dsProjectList;
public DataTable dtAvailableList;
public DataView dvAvailableList;
public DataTable dtSelectedList;
public DataView dvSelectedList;
public ProjectList()
{
this.TableName = "FtPoMast_Base";
this.PrimaryKey = "BidNumber";
}
public void GetAvailableProjectList()
{
this.dsProjectList = this.GetDataSet( "select DISTINCT BidNumber from FtPoMast_Base where LTRIM(BidNumber) <> ''", "FtPoMast_Base" );
this.dtAvailableList = this.dsProjectList.Tables[0];
this.dvAvailableList = this.dsProjectList.Tables[0].DefaultView;
}
public void GetSelectedProjectList()
{
this.FillDataSet(this.dsProjectList, "select BidNumber from ProjectList", "ProjectList");
this.dtSelectedList = this.dsProjectList.Tables[1];
this.dvSelectedList = this.dsProjectList.Tables[1].DefaultView;
}
}
}
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement