Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One grid, 2 bizobjects How-To switch bindingsource
Message
From
01/03/2005 16:26:54
 
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00991766
Message ID:
00991768
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform