Hi,
I have a webgrid which looks as follows
when user clicks on the row a dropdown appears and user can select any value from the drop down
lets assume user picked Package Insert. Now database is updating the right value adding a new value correctly and deletes are also working fine, but the is displaying as follows
I could not figure out how to display the selected text instead of ID.
Please advice
I tried it but once the page posts back I still see the ID but not text.
protected void uxDispositionUltraWebGrid_InitializeLayout(object sender, LayoutEventArgs e) { e.Layout.Bands[0].CellClickAction = CellClickAction.Edit; e.Layout.Bands[0].AllowUpdate = AllowUpdate.Yes;
this.uxDispositionUltraWebGrid.Bands[0].Columns[0].Header.FixedHeaderIndicator = FixedHeaderIndicator.None; this.uxDispositionUltraWebGrid.Bands[0].Columns[0].Width = Unit.Pixel(300); this.uxDispositionUltraWebGrid.Bands[0].ColHeadersVisible = ShowMarginInfo.No; this.uxDispositionUltraWebGrid.Columns[1].Hidden = true; this.uxDispositionUltraWebGrid.Columns[2].Hidden = true; this.uxDispositionUltraWebGrid.Columns[3].Hidden = true; this.uxDispositionUltraWebGrid.Columns[4].Hidden = true; this.uxDispositionUltraWebGrid.Columns[5].Hidden = true; this.uxDispositionUltraWebGrid.Columns[6].Hidden = true;
e.Layout.Bands[0].Columns.FromKey("Description").Type = ColumnType.Custom; e.Layout.Bands[0].Columns.FromKey("Description").EditorControlID = this.uxDispositionWebCombo.UniqueID; e.Layout.Bands[0].Columns.FromKey("Description").ValueList.DisplayStyle = ValueListDisplayStyle.DisplayText; e.Layout.Bands[0].Columns.FromKey("Description").ValueList.DisplayMember = "Description";
this.uxDispositionUltraWebGrid.Height = Unit.Pixel(100); }
I am setting it in the worng place?
Set the ValueList.DisplayMember to your column named "Description"