We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Dynamic GenericDropDown

I have a genericdropdown control on a page, but I want to put the controls in during the code behind. But, when I do it using the below code, The button that shows the list doesn't seem to work. Am I missing something?

Dim ThisTable As New Table
ThisTable.Style.Value = "border-style:solid; border-color:#7C6F57; border-width:thin; background: #FFFFFF;"
Dim ThisRow As TableRow
Dim ThisCell As TableCell
Dim ThisButton As LinkButton
For Each item As String In Choices
ThisRow = New TableRow
ThisCell = New TableCell
ThisButton = New LinkButton
ThisButton.CssClass = "gdd"
ThisButton.Text = item
ThisButton.OnClientClick = Me.FixedInputDropDown.ClientObjectId & ".SetText('" & item & "');" & Me.FixedInputDropDown.ClientObjectId & ".HidePopup(); return false;"
ThisCell.Controls.Add(ThisButton)
ThisRow.Cells.Add(ThisCell)
ThisTable.Rows.Add(ThisRow)
Next

'Here is where I add it to the GenericDropDown Me.FixedInputDropDown.PopupControls.Add(ThisTable)


3 Replies

MW Melba Winshia Syncfusion Team June 9, 2008 06:57 AM UTC

Hi Kathy,

Thank you for your interest in Syncfusion Products.

I am able to reproduce this issue. This issue is suspected to be a defect and we have sent this to our development team for more analysis. We will update you on this issue on or before 11th June 2008. As a workaround you can use PlaceHolder to add the controls to GDD in code behind. Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Tools.Web/6.2.0.40/Tools_Asp_Generic_F74291/main.htm

Please try this and let me know if this helps.

Thanks,
Melba




MW Melba Winshia Syncfusion Team June 12, 2008 12:48 PM UTC

Hi Kathy,

Thank you for being patient.

The issue with - 'Controls could not be added to GenericDropdown dynamically' has been confirmed as a defect and our Developers are working on fixing this issue. The fix for this issue is expected to be available on June 26th 2008 and we will get back to you on the specified date with more details.

Please refer to the following link for the status update on this defect fix.

http://www.syncfusion.com/support/issues/tools/Default.aspx?ToDo=view&questId=10560

Please let us know if you have any other concerns.

Regards,
Melba





RP Rekha P Syncfusion Team August 20, 2008 07:21 AM UTC

Hi Kathy,

Thank you for being patient.

We are glad to inform you that the issue - 'Controls could not be added to GenericDropdown dynamically' has been fixed and the fix for this issue is available in the Development build v6.3.0.35 which you can refer to the below location for download.

http://www.syncfusion.com/downloads/product/build.aspx

Also please refer the below link which contains the sample for this issue.
http://websamples.syncfusion.com/samples/Tools.Web/6.3.0.35/48069/main.htm

Please let me know if you have any concerns.

Regards,
Rekha


Loader.
Live Chat Icon For mobile
Up arrow icon