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

Listbox is Populated, but items are not visible

6 Answers 244 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 26 Feb 2011, 08:25 AM
I have two RadListBox controls in a ASP.NET user control with the allowtransfer property set to true. I  populate the RadListBox with RadListBoxItems on page load. The RadListBox is populated, but the text is not visible for any of the items. If I transfer the items to the other RadListBox, they transfer, but they are again not visible. I then refresh the page and I can see them in the second RadListBox. I transfer them back to the first RadListBox and the text is then visible in that listbox also. Please help, I can't seem to find what is causing the text to not display.

6 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 02 Mar 2011, 12:07 PM
Hello Brian,

Can you provide the related code of the RadListBoxes(the page and code behind) so we can explore it?

Kind regards,
Kate
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Brian
Top achievements
Rank 1
answered on 02 Mar 2011, 04:05 PM
This is a DNN Module.

You can see the issue at: http://www.smvcuniversity.com/telerikissue.aspx

You will notice that the "available users" list is populated, but you can't see any of the text. If you transfer the items to "assigned users" and then refresh the page, you can see them and if you then transfer them back, you can still see them. Even though they are there, you can't see them when the page loads, although you can highlight them.

ASP Code:
 <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                        <asp:Panel ID="Panel2" runat="server" GroupingText="Users"
                            meta:resourcekey="Panel2Resource1">
                            <table cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td>
                                        <dnn:Label ControlName="lblAvailableUsers" ID="lblAvailableUsers" Text="Available Users"
                                            runat="server" />
                                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                            <ContentTemplate>
                                                <telerik:RadListBox ID="lbAvailableUser" runat="server"
                                                    AllowAutomaticUpdates="True" AllowTransfer="True" AutoPostBack="True"
                                                    AutoPostBackOnTransfer="True" ForeColor="Black" Height="175px"
                                                    meta:resourcekey="lbDepartUsersResource1" OnInserting="lbDepartUsers_Inserting"
                                                    SelectionMode="Multiple" TransferToID="lbAssignUser" Width="185px"
                                                    AutoPostBackOnDelete="True" AutoPostBackOnReorder="True"
                                                    EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="False"
                                                    EnableEmbeddedSkins="False" EnableTheming="False"
                                                    RegisterWithScriptManager="False" Skin="Windows7">
                                                    <ButtonSettings ReorderButtons="Common" />
                                                </telerik:RadListBox>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                    <td>
                                        <dnn:Label ControlName="lblAssignedUsers" ID="lblAssignedUsers" Text="Assigned Users"
                                            runat="server" />
                                        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                            <ContentTemplate>
                                                <telerik:RadListBox ID="lbAssignUser" runat="server" Width="155px"
                                                    Height="175px" AutoPostBackOnTransfer="True"
                                                    OnDeleting="lbAssignUser_Deleting" OnInserting="lbAssignUser_Inserting"
                                                    meta:resourcekey="lbAssignUserResource1" AllowAutomaticUpdates="True" AllowTransfer="True" AutoPostBack="True"
                                                    Skin="Windows7">
                                                    <ButtonSettings ReorderButtons="Common" />
                                                </telerik:RadListBox>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <br />
                                        <dnn:Label ControlName="lblDepartmentUsers" ID="lblDepartment" Text="Department Users"
                                            runat="server" />
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <telerik:RadListBox ID="lbDepartUsers" runat="server" Width="185px"
                                                    Height="175px" TransferToID="lbManager"
                                                    AllowTransfer="True" AutoPostBackOnTransfer="True"
                                                    OnInserting="lbDepartUsers_Inserting" SelectionMode="Multiple"
                                                    meta:resourcekey="lbDepartUsersResource1" ForeColor="Black" AllowAutomaticUpdates="True" AutoPostBack="True"
                                                    Skin="Windows7">
                                                    <ButtonSettings ReorderButtons="Common" />
                                                </telerik:RadListBox>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                    <td>
                                        <br />
                                        <dnn:Label ControlName="lblManager" ID="lblManagers" Text="Department Managers" runat="server" />
                                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                            <ContentTemplate>
                                                <telerik:RadListBox ID="lbManager" runat="server" Width="155px" Height="175px"
                                                    OnInserting="lbManager_Inserting" meta:resourcekey="lbManagerResource1" AllowAutomaticUpdates="True"
                                                    AllowTransfer="True" AutoPostBack="True" Skin="Windows7">
                                                    <ButtonSettings ReorderButtons="Common" />
                                                </telerik:RadListBox>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                       </telerik:RadAjaxPanel>

C# Code:
    private void fnClearAll()
        {
            lbAvailableUser.Items.Clear();
            lbManager.Items.Clear();
            lbAssignUser.Items.Clear();
            lbDepartUsers.Items.Clear();
            txtDescription.Text = "";
            txtName.Text = "";
        }
        private void GetDepartmentInfo()
        {
            try
            {
                this.fnClearAll();
                List<dnn_Users_Info> users = dnn_Misc_Controller.dnn_Users_ListNotAssigned(PortalId);
                lbAssignUser.Items.Clear();
                lblDepart.Text = tvDepartment.SelectedNode.Text;
                HFDepartProcess.Value = "update";
                a_DepartmentInfo objDepart = new a_DepartmentInfo();
                objDepart.DepartmentID = Convert.ToInt32(tvDepartment.SelectedNode.Value);
                //objDepart.ModuleId = ModuleId;
                //objDepart.PortalId = PortalId;
                DataSet dsDepart = objDepartments.GetDepartInfo(objDepart);

                List<dnn_Users_Info> users1 = dnn_Misc_Controller.dnn_Users_ListNotAssigned(PortalId);
                foreach (dnn_Users_Info user in users1)
                {
                    lbAvailableUser.Items.Add(new RadListBoxItem(user.DisplayName, user.UserID.ToString()));
                }

                if (dsDepart.Tables[0].Rows.Count >= 1)
                {
                    txtName.Text = dsDepart.Tables[0].Rows[0]["Name"].ToString();
                    txtDescription.Text = dsDepart.Tables[0].Rows[0]["Description"].ToString();
                    foreach (DataRow row in dsDepart.Tables[1].Rows)
                    {
                        if (Convert.ToBoolean(row["isManager"]) == false)
                        {
                            RadListBoxItem item1 = new RadListBoxItem(row["DisplayName"].ToString(), row["UserID"].ToString());
                            lbDepartUsers.Items.Add(item1);
                        }
                        else
                        {
                            RadListBoxItem item = new RadListBoxItem(row["DisplayName"].ToString(), row["UserID"].ToString());
                            lbManager.Items.Add(item);
                        }
                        RadListBoxItem item2 = new RadListBoxItem(row["DisplayName"].ToString(), row["UserID"].ToString());
                        lbAssignUser.Items.Add(item2);

                    }
                }
            }
            catch (Exception ex)
            {
                lbError.ForeColor = System.Drawing.Color.Red;
                lbError.Text = ex.Message;
            }
        }
0
Brian
Top achievements
Rank 1
answered on 09 Mar 2011, 05:54 AM
Any ideas?
0
Kate
Telerik team
answered on 09 Mar 2011, 02:26 PM
Hi Brian,

Before we proceed with your request could you please take a minute and answer a couple of questions for us?

I reviewed your account and it seemed that you've been evaluating our products for almost one year. Could you share with us how your evaluation is going?

Any feedback on our products (installation, ease of use, documentation) will help us in providing better products and services in the future.

Apart from this, the code that you provided contains many dependencies. We will need something that we could run and inspect locally.

All the best,
Kate
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Brian
Top achievements
Rank 1
answered on 09 Mar 2011, 03:02 PM
We have a DotNetNuke professional subscription which includes the Telerik controls. You would need to install DotNetNuke to run it locally there, but I don't see why you can't see the problem by looking at the link I provided and the code. Please help solve this issue or we will need to go with a different controls provider and tell everyone about the poor functionality and lack of support for Telerik controls.
0
Genady Sergeev
Telerik team
answered on 15 Mar 2011, 03:20 PM
Hello Brian,

I've followed the live url provided, however, as far as I can see the Available users list is populate with data on page load and it is possible to transfer items back and forth without any noticeable issues. Am I missing something?

Best wishes,
Genady Sergeev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
ListBox
Asked by
Brian
Top achievements
Rank 1
Answers by
Kate
Telerik team
Brian
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or