Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Dropdownlist is showing as text
posted
Hi, I have a ultrawebgrid with a column of type dropdownlist. When the page loads the dropdownlist column displays the text in the dropdownlist but I want to see the dropdown itself so that the user can select. The code looks like this: Adding a band to the Grid: vT.ValueListItems.Add(1, "One"); vT.ValueListItems.Add(2, "Two"); UltraGridBand ub = new UltraGridBand(true); ub.CellClickAction = CellClickAction.CellSelect; ub.Columns.Add("One"); ub.Columns.Add("Two"); ub.Columns[1].CellButtonDisplay = CellButtonDisplay.Always; ub.Columns[1].Type = ColumnType.DropDownList; ub.Columns[1].ValueList.DisplayStyle = ValueListDisplayStyle.DisplayText; ub.Columns[1].DataType = typeof(string).ToString(); ub.Columns[1].AllowUpdate = AllowUpdate.Yes; ub.Columns[1].ValueList = vT; this.grd.Bands.Add(ub); Populating the grid at runtime: UltraGridRow ur = new UltraGridRow(new Object[ { "", vT.ValueListItems[0].ToString() }); grd.Rows.Add(ur); Am I missing something here?
Parents
  • 125
    posted
    I made it to work using the following code: grd.Bands[1].Columns[2].Width = 100; grd.Bands[1].Columns[2].Type = ColumnType.DropDownList; grd.Bands[1].Columns[2].CellButtonDisplay = CellButtonDisplay.Always; grd.Bands[1].Columns[2].AllowUpdate = AllowUpdate.Yes; grd.Bands[1].Columns[2].ValueList = v; grd.Bands[1].CellClickAction = CellClickAction.CellSelect; grd.Bands[1].Columns[2].ValueList.DisplayStyle = ValueListDisplayStyle.DisplayText; grd.Bands[1].Columns[2].ValueList.DataBind(); But now when the page loads the dropdown is not visible. When I click on the cell, then I can see the dropdownlist. How can I make the dropdownlist to be visible at all times?
Reply Children
No Data