Hi
following code:
----this.Grid.BeforeRowActivate += new Infragistics.Win.UltraWinGrid.RowEventHandler(this.MainUltraGrid_BeforeRowActivate);
bs = new BindingSource();bs.DataSource = this.DataSet;bs.DataMember = "MyTable";-----
Now, when I set the DataSource to my dataset (right before I set the DataMember of my BindingSource).the BeforRowActivate Events gets fired and the UltraGrid is bound to the first table in my DataSet's Table Collection.
Does the Ultragrid automatically bind to the first table or is that the BindingSource's behaviour. If the Ultragrid does this, is there any way to prevent this?
Use the SetDataBinding method instead, which assigns the DataSource and DataMember in one atomic operation.
I've used the SetDataBinding method to bind a the UltraGrid
to a bindingsource that contains an collection of entities
like this
bindingSource1.DataSource = _context.tbAREmployee .Include("tbPrEmpChildren") .Where(x => x.AREmployeeID == 1320);
ChildrenInfoGrid.SetDataBinding(bindingSource1, "tbPrEmpChildren");
it is working fine upon the load of the windows form and it's displaying data but the problem is when
i click on any controller in the form the data in the UltraGrid disappears ,
is there's any code that i'm missing ?
I'm using Infragistics V12.2 with EF 4