We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

I can not get a dropdownlist to display on my web grid

I have tried this:

Dim gridcolumn As New Aspose.Grid.Web.BindColumn
With gridcolumn
.Caption = meta.DisplayName
.DataField = meta.XsysTableColumn.ColumnName
Dim width As WebControls.Unit = New WebControls.Unit(5)
If meta.GridWidth.HasValue Then width = New WebControls.Unit(meta.GridWidth.Value) 'todo: should not be nullable
.Width = width
.EnableSort = True
.IsReadOnly = Not meta.XsysTableColumn.IsEditable
grid.ForceValidation = True
.Validation = New Aspose.Grid.Web.Validation
.Validation.ValueList.Add("1,1:Value1")
'.Validation.LoadValueList(dataSet31.Categories.DefaultView, "CategoryID", "CategoryName", True)
'.WebWorksheets(0).BindColumns("CategoryID").Validation.ValueList.Add("1, Hello") DROPDOWN LIST
'newColumn.NumberType =
'newColumn.Style =
'newColumn.Validation =
'newColumn.CustomFormat =
End With
worksheet.BindColumns.Add(gridcolumn)

I have also tried this:

grid.ForceValidation = True
Dim cell As WebCell = worksheet.Cells("B3")
cell.CreateValidation(ValidationType.DropDownList, True)
cell.Validation.ValueList.Add("Bachelor")
cell.Validation.ValueList.Add("Master")
cell.Validation.ValueList.Add("Doctor")

Hi,

Well, I tried to add DropDownList validation in both way i.e.., add a simple dropdownlist validation on some cell and also in databinding mode, add dropdownlist to a bound column. It works abs fine without any issue at all.

Which version of Aspose.Grid.Web you are using? kindly try our latest version: http://www.aspose.com/community/files/53/visual-components/aspose.grid/entry126616.aspx

If you still find the issue, kindly create a simple project, zip it and post it here to show the issue. Also, give us your environment details e.g.., Browser Type, OS, IIS settings, .NET framework etc.

Thank you.

Ok, I got this way working:

Dim gridcolumn As New Aspose.Grid.Web.BindColumn
With gridcolumn
.DataField = meta.XsysTableColumn.ColumnName
grid.ForceValidation = True
.Validation = New Aspose.Grid.Web.Validation
.Validation.IsRequired = True
.Validation.ValidationType = ValidationType.DropDownList
.Validation.ValueList.Add("1,1:Value1")
End With

I added:
.Validation.IsRequired = True
.Validation.ValidationType = ValidationType.DropDownList

IMPORTANT QUESTION:
Is it possible to make the dropdownlists always visible? It is confusing to the user to not see one available, and it is also quite inconvenient to click the cell first in order to access the dropdownlist.

<agw:GridWeb ID="GridWeb1" runat="server" Width="100%" Height="500px" XhtmlMode="true"
EditMode="true" EnableAJAX="true" EnableClientColumnOperations="true"
EnableClientFreeze="true" EnableClientResizeColumnRow="true" EnableSession="true" EnableViewState="true"
HeaderBarStyle-HorizontalAlign ="Left" HeaderBarStyle-Wrap ="true" NoScroll="false" SessionMode="Session" ShowBottomBar ="true" ShowSaveButton ="true" ShowSubmitButton="true">




Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, currently Aspose.GridWeb does not support to show / manipulate the Dropdown list as an ASP.NET control. So you have to use it like a validation control and it cannot be shown as “always visible”.

Thank You & Best Regards,