Use UltraDropDown to fill multiple cells in an UltraGrid
New DiscussionHello,
I’m new to Infragistics and am trying to add onto an existing WinForms App. Using the below article I am able to populate an UltraDropDown from a DataTable, and bind it to the first cell of an UltraGrid. All four columns of the DataTable display in the DropDown. After a BtnOnClick for AddNew Row I can select from the UltraDropDown, but it will only fill the first column of the row. I want to to use the rest of the columns in the UltraDropDown to fill other columns in the UltraGrid. How can I do that? Is there a better means to accomplish what I want to do than an UltraDropDown?
Here is my code:
private void ugChargebacks_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
e.Layout.Bands[0].Columns[“ClaimsProviderAmountsId”].Hidden = true;
e.Layout.Bands[0].Columns[“Custno”].Hidden = false;
e.Layout.Bands[0].Columns[“Subno”].Hidden = false;
e.Layout.Bands[0].Columns[“IDno”].Hidden = true;
e.Layout.Bands[0].Columns[“Amount”].Format = “C”;
UltraDropDown agentDropDown = new UltraDropDown();
agentDropDown.DataSource = _diag.InspectionFeeInfo.agentList;
Controls.Add(agentDropDown);
agentDropDown.SetDataBinding(_diag.InspectionFeeInfo.agentList, null);
agentDropDown.ValueMember = “Type”;
agentDropDown.DisplayMember = “Custno”;
e.Layout.Bands[0].Columns[“Custno”].ValueList = agentDropDown;
}
private void btnAddChageback_Click(object sender, EventArgs e)
{
UltraGridRow row = ugChargebacks.DisplayLayout.Bands[0].AddNew();
}
