>Check out the mmUserControl. :-) The mmUserControl was built for this exact situation! Enjoy!
>
>This example shows how the Business Objects of the web form are exposed to the mmUserControl and can then be used to bind the data to the controls within the mmUserControl.
>
>
>On the user control create a property which will link your Business Object on your web page to the one on the user control. Because they are objects, it will be linked by a pointer, meaning that anything you do to it on the form can also be done on the UserControl and the effects seen in both locations.
>
>
>
>public virtual Customer oCustomer
>{
> // readonly from the UserControl
> get
> {
> return this._Customer;
> }
>}
>private Customer _Customer = null;
>
>
>
>In the page_load of the UserControl we establish the link with the web form's registered business object.
>
>
>private void Page_Load(object sender, System.EventArgs e)
>{
> this._Customer = (Customer) this.BusinessWebPage.GetBizObj("Customer");
>}
>
>
>
>Here is an example a DeleteCommand for a standard DataGrid, but from this you can probably see that the DataBinding is fairly easy.
>
>
>private void grdCustomer_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
>{
> // Get the row number to delete
> int RowToDelete = e.Item.DataSetIndex;
>
> // Retrieve the previous DataSet
> DataSet dsCustomer = (DataSet)Session["dsCustomer"];
>
> // Tell the business object to delete the specified row
> this.oCustomer.Delete(dsCustomer, RowToDelete);
>
> // realign the CurrentPageIndex if we have just deleted the last row on the page
> if (e.Item.ItemIndex < 1 && this.grdCustomer.CurrentPageIndex > 0)
> this.grdCustomer.CurrentPageIndex = this.grdCustomer.CurrentPageIndex - 1;
>
> // Rebind the DataGrid
> this.BusinessWebPage.BindControl(this.grdCustomer);
>}
>
>
>>I am attempting to Bind Data to a mmUltraWeb grid placed on a template for page 2 (tab 01) of an InfragisticsWebTab, but cannot figure out how to bind the data to that particular object.
>>
>>I have determined that the data is coming across from SQL (in debug) - I have the Data Binding on the grid set properly, but it just doesn't seem to work right without binding the data.
>>
>>I have tried dropping a UserControl object onto the page template, but I am unable to use the business objects along with the User Object.
>>
>>I attempted but was unable to use the mmUltraWebTab, which ceased to work after setting the "preset" properties.
>>
>>Any help would be appreciated!
Hi Gordon,
I have set up the mmUserControl as stated in the "Help" instructions. I have one question - Where does the "Get" statement go - in the class definitions?
If so, I have done everything as suggested, and it still does not populate the data. It is hard to tell, because debug breakpoints don't seem to work within the UserControl. I am receiving no errors, but the data is not populating.
Bill Benton
Senior Systems Analyst
Nuvell Financial Services