This is a migrated thread and some comments may be shown as answers.

Populating Combobox in FormCreating

1 Answer 29 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
AName
Top achievements
Rank 1
AName asked on 11 Dec 2013, 07:24 PM

Hi there,

I am attempting to populate a combo box within a panel when the RadScheduler form Creating method is called.

if i walk through the code i can see the process hitting the breakpoint however when the combo box is displayed it is blank.


    Protected Sub RadScheduler1_FormCreating(ByVal sender As Object, ByVal e As SchedulerFormCreatingEventArgs)

        If e.Mode = SchedulerFormMode.Insert Then

            e.Cancel = True

        ElseIf e.Mode = SchedulerFormMode.Edit Then

            e.Cancel = True

            ScriptManager.RegisterStartupScript(Page, [GetType](), "formScript", "Sys.Application.add_load(openForm);", True)

            PopulateEditForm()

            formRSUpdate_tbMessage.Text = "This doesnt get set either!"

        End If

    End Sub


    Private Sub PopulateEditForm()

        ComboUtils.FillComboBox1(formRSUpdate_ComboBox1)

    End Sub


Within my aspx i have the following...

<telerik:RadDock runat="server" ID="RadDock1" Width="350px" Height="220px" Closed="true" Style="z-index: 2000;" Title="Edit Appointment">

<Commands>

<telerik:DockCloseCommand></telerik:DockCloseCommand>

</Commands>

<ContentTemplate>

<asp:Panel ID="PanelDock" runat="server">

...

...

<td style="text-align: left">

    <telerik:RadComboBox ID="formRSUpdate_ComboBox1" runat="server" AutoPostBack="True" Width="220px" />

</td>


The auto postback is set to true because this is the first of two cascading combo boxes.

The selection within this combo box drives the population of the second.

If i use a sqldatasource, I can populate Combox1, and combox2 successfully populates.

However since i need to drive both on the specific appointment i would like to keep

everything within the code behind.

This also does not get set.

formRSUpdate_tbMessage.Text = "This doesn't get set either!"







Can you please help?  I am trying to populate a bunch of controls within the form from the appointment.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 16 Dec 2013, 09:48 AM
Hello,

I tried to replicate the faced issue, base on the provided code snippets and information, but to no avail. I noticed that you are populating the RadComboBox using - ComboUtils.FillComboBox1(formRSUpdate_ComboBox1). Could you demonstrate us the logic and code in the Class? In addition, I am sending you a sample project, base on the provided code snippets, demonstrating the correct population with data of the RadComboBox.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
AName
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or