Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One grid, 2 bizobjects How-To switch bindingsource
Message
De
01/03/2005 16:26:54
 
 
À
01/03/2005 16:23:30
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00991766
Message ID:
00991768
Vues:
16
>Hi,
>
>On a web page I have an instance of MmDataGrid and 2 bizobjs. Each bizobj has one table. The tables have the exact same structure. The tables contain different data. I would like to switch the data driving the datagrid with the press of a button. I set MmDataGrid.BindingSource property in the page_load event of the page initially as long as it is not a postback.
>
>
>private void Page_load(.....
>{
>  this.oAssist = (Assist)this.RegisterBizObj(new Assist());
>  this.oDictations = (Dictations)this.RegisterBizObj(new Dictations());
>
>  if (!IsPostBack)
>  {
>    this.BindData("Dictations");
>  }
>}
>
>
>
>private void BindData(string tBindingSource)
>{
>  DataSet dsDictations = this.oDictations.GetAllDictations();
>  DataSet dsAssist = this.oAssist.GetAllAssistants();
>  this.MmDataGrid.BindingSource=tBindingSource
>}
>
>
>
>When the Page loads the grid is filled with "Dictations" data. I would like the grid to fill with "Assist" data after the press of btnAssistData. I placed the following code in the button's event handler.
>
>
>private void btnAssistData_Click(...
>{
>  this.BindData("Assist")
>
>}
>
>
>When I press btnAssistData the grid remains filled with "Dictations" data. What am I doing worng.
>
>Regards,
>Neil
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform