Hi Every Body,
I added dropdown list to the Ultraweb Grid dynamically..below am displaying the code..i just want to do the same for Windows Application..please do the needfull
if (UltraWebGridDrill.Columns.Count == 0)
{
if (TblDrill.Columns.Count > 1)
TblDrill.Columns.Clear();
TblDrill.Columns.Add(new DataColumn("Drill Invoke Column No", typeof(string)));
TblDrill.Columns.Add(new DataColumn("Child Report Name", typeof(string)));
TblDrill.Columns.Add(new DataColumn("Drill Report Type", typeof(string)));
TblDrill.Columns.Add(new DataColumn("Pass Row Dim To Child", typeof(string)));
TblDrill.Columns.Add(new DataColumn("Pass Report Filter To child", typeof(string)));
TblDrill.Columns.Add(new DataColumn("Report_Id", typeof(string)));
}
DataRow Row_Add;
Row_Add = TblDrill.NewRow();
if (Drop_rptType1.SelectedItem.Text == "Drill Across")
Row_Add["Drill Invoke Column No"] = Drop_invokeclmNo.SelectedIndex.ToString();
else
Row_Add["Drill Invoke Column No"] = "";
//Row_Add["Drill Invoke Column No"] = Drop_invokeclmNo.SelectedItem.Text;
Row_Add["Child Report Name"] = Drop_ChildReportName.SelectedItem.Text;
Row_Add["Drill Report Type"] = Drop_rptType1.SelectedItem.Text;
Row_Add["Pass Row Dim To Child"] = ChkDimChild.Checked;
Row_Add["Pass Report Filter To child"] = Chk_ReportFilterChild.Checked;
Row_Add["Report_Id"] = Drop_ChildReportName.SelectedItem.Value;
TblDrill.Rows.Add(Row_Add);
UltraWebGridDrill.DataSource = TblDrill;
UltraWebGridDrill.DataBind();
if (UltraWebGridDrill.Columns.Count > 0)
UltraWebGridDrill.Columns[1].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;
UltraWebGridDrill.Columns[1].EditorControlID = "Drop_invokeclmNo30";
UltraWebGridDrill.Columns[2].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;
UltraWebGridDrill.Columns[2].EditorControlID = "WebCombo1";
UltraWebGridDrill.Columns[3].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList;
Infragistics.WebUI.UltraWebGrid.ValueList PhList1 = new Infragistics.WebUI.UltraWebGrid.ValueList(true);
PhList1.ValueListItems.Add("1", "Drill Down");
PhList1.ValueListItems.Add("2", "Drill Across");
UltraWebGridDrill.DisplayLayout.Bands[0].Columns[3].ValueList = PhList1;
UltraWebGridDrill.Columns[4].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox;
UltraWebGridDrill.Columns[5].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox;
This KB article should help:
HOWTO:What is the best way to place a DropDown list in a grid cell?
By using Following events I have successfully added an UltraCombo to an ultraGrid cell dynamically. It's working Fine. Is there any way that I can use RowSelected Event with the dynamically added UltraCombo in the UltraGrid cell.
Actually what i wont to do is to get the selected row details in the dynamically added UltraCombo in the UltraGrid cell.
Please help me ....
private void cmdAdd_Click(object sender, EventArgs e)
//Add rows to Composition grid in Wooven
int counter = 0;
Infragistics.Win.UltraWinGrid.UltraGridRow row = grdWoovenCom.DisplayLayout.Bands[0].AddNew();
counter = grdWoovenCom.Rows.Count;
if (grdWoovenCom.Rows.Count <= 1)
row.ParentCollection.Move(row, 0);
counter = counter - 1;
row.ParentCollection.Move(row, counter);
private void grdWoovenCom_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
DataSet UserTable = userLoading();
//Create DropDown
UltraCombo sd = new UltraCombo();
sd.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
sd.DataSource = UserTable.Tables[0];
sd.DisplayMember = UserTable.Tables[0].Columns[1].ToString();
sd.ValueMember = UserTable.Tables[0].Columns[1].ToString();
sd.DataBind();
e.Layout.Bands[0].Columns[0].ValueList = sd;