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

Auto generated "Select" text next to rad combobox

9 Answers 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lubna Ansari
Top achievements
Rank 1
Lubna Ansari asked on 04 Jun 2010, 10:45 AM
Hi,
I have a print page functionality on my page. When I print everything comes properly except "Select " text next to each rad combo box. When I view source the code I found some extra code gets appended by defualt to the rad combo box .The anchor tag with id "ctl00_cntContent_cmbAccess_Arrow" and text "Select" is that extra code as shown below.

<tr class="rcbReadOnly">
<td class="rcbInputCell rcbInputCellLeft" style="margin-top:-1px;margin-bottom:-1px;width:100%;"><input name="ctl00$cntContent$cmbAccess" type="text" class="rcbInput" id="ctl00_cntContent_cmbAccess_Input" value="Unit Helper" style="display: block;" readonly="readonly" /></td><td class="rcbArrowCell rcbArrowCellRight" style="margin-top:-1px;margin-bottom:-1px;"><a id="ctl00_cntContent_cmbAccess_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
</tr>

The code I have written on page is :

 

<tr align="center">

 

 

<td style="width:30%" align="right" class="Label">

 

Audit Role:

 

</td>

 

 

<td align="left" style="width:35%" colspan="2">

 

 

<asp:DropDownList ID="ddl" runat="server" DataSourceID="sqlRole" DataTextField="Role" DataValueField="ID" Width="250px" />

 

 

</td>

 

 

</tr>

 


The "Select" text doesn't come on screen but only when I click Print page btn on my page which opens a new window with the controls of the page at that time next to each rad combo box it shows "Select" text. How can I remove this??

Regards,
Lubna.


9 Answers, 1 is accepted

Sort by
0
Chip
Top achievements
Rank 1
answered on 09 Jun 2010, 12:27 PM
Are you using a Template ? I dont' think this is generated by the combo box. Can you paste the ComboBox definition from the aspx?
0
Lubna Ansari
Top achievements
Rank 1
answered on 10 Jun 2010, 09:32 AM
Hi Chip,

Here is the code of combo box and the data source I am binding with combo.

<

 

tr align="center">

 

 

<td style="width:30%" align="right" class="Label">

 

Unit Name:

 

</td>

 

 

<td align="left" style="width:35%" colspan="2">

 

 

<telerik:RadComboBox ID="cmbUnitName" runat="server" Width="250px" DataSourceID="sqlUnit" DataValueField="ID" DataTextField="Unit_Name" />

 

 

</td>

 

 

</tr>

 

<

 

asp:SqlDataSource ID="sqlUnit" ConnectionString="<%$ appSettings:ConnectionString%>" SelectCommandType="StoredProcedure"

 

SelectCommand

 

="Get_UnitMaster"

 

runat

 

="server" />

 

0
Simon
Telerik team
answered on 14 Jun 2010, 04:51 PM
Hi Lubna Ansari,

This issue could happen if only the base stylesheet file has been loaded. Still without debugging your case I will be unable to tell with certainty whether and why this happens. Can you provide me with a live url where I can observe the issue?

And yes, this output is generated by RadComboBox so that there is a way to open the drop down in case images are not loaded for some reason.

Regards,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
steven
Top achievements
Rank 1
answered on 18 Jun 2010, 09:46 AM
I also had the same problem .When I print everything comes properly except "Select " text next to each rad combo box.The same to RadDatePicker("Auto generated "open the calendar popup" text next to RadDatePicker").
I put my screenshots attached.I hope reply as soon as possible.Thanks.
<td>
        <telerik:RadDatePicker ID="dpkDate" runat="server">
        </telerik:RadDatePicker>
</td>
<td>         
<telerik:RadComboBoxID="cbxClientCode" runat="server" AutoPostBack="true" OnItemDataBound="cbxClientCode_OnItemDataBound" EnableLoadOnDemand="true" OnSelectedIndexChanged="cbxClientCode_SelectedIndexChanged" OnItemsRequested="cbxClientCode_ItemsRequested"  >
  </telerik:RadComboBox>
</td>
0
Simon
Telerik team
answered on 24 Jun 2010, 12:53 PM
Hello steven,

The screenshot shows that the CSS and background images are missing. Since there are 'alt' texts behind the Toggle Button of the RadComboBox and the Date Popup of the RadDatePicker they become visible in this case.

You can hide the RCB's Toggle Button by setting the ShowToggleImage to false. For the RDP you can hide its button with this setting:
<DatePopupButton Visible="false" />

Regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lubna Ansari
Top achievements
Rank 1
answered on 24 Jun 2010, 02:19 PM

Hi Simon ,
ShowToggleImage doesnot hide 'select' text for combo box.

Regards,
Lubna.

0
Kalina
Telerik team
answered on 25 Jun 2010, 05:08 PM
Hello Lubna Ansari,

Since the arrow in fact renders as hyperlink tag (the arrow image is applied by the control skin), let me suggest you handle the OnClientLoad event and remove the "select" text rendered within this tag:

<script type="text/javascript">
var arrowLinkHidden
 
function OnClientLoadHandler(sender, eventArgs)
{
    arrowLinkHidden  = document.getElementById("RadComboBox1_Arrow");
    arrowLinkHidden.innerHTML = "";
}
 
</script>

<telerik:RadComboBox ID="RadComboBox1" runat="server"  OnClientLoad="OnClientLoadHandler"  >
    <Items>
        <telerik:RadComboBoxItem Text="item 1" Value="1" />
        <telerik:RadComboBoxItem Text="item 2" Value="2" />
        <telerik:RadComboBoxItem Text="item 3" Value="3" />
    </Items>
</telerik:RadComboBox>

Regards,
Kalina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lubna Ansari
Top achievements
Rank 1
answered on 28 Jun 2010, 11:54 AM
Hi Kalina,

Thanks for the reply. It is still not working

document.getElementById("RadComboBox1_Arrow"); is coming as null object.

Below is my code

 

<telerik:RadComboBox ID="uccmbUnitName" runat="server" Width="250px"

 

 

DataSourceID="sqlUnit" DataValueField="Id" DataTextField="Unit_Name" OnClientLoad="OnClientLoadHandler" />

 



var

 

arrowLinkHidden

 

function

 

OnClientLoadHandler(sender, eventArgs)

 

{

arrowLinkHidden =document.getElementById(

"uccmbUnitName_Arrow");

 

alert(arrowLinkHidden);

 

if(arrowLinkHidden!=null)

 

{

arrowLinkHidden.innerHTML =

"";

 

}

}

Regards,
Lubna.

    

0
Kalina
Telerik team
answered on 01 Jul 2010, 07:55 PM
Hello Lubna Ansari,

I am afraid that your check is not quite precise. You can alert the innerHTML and tagName if you want to be sure that you have selected the right element:

<telerik:RadComboBox ID="uccmbUnitName"  runat="server" Width="250px"
OnClientLoad="OnClientLoadHandler" DataSourceID="sqlUnit"
DataValueField="Id" DataTextField="Unit_Name" />

function OnClientLoadHandler(sender, eventArgs)
{
    arrowLinkHidden = document.getElementById("uccmbUnitName_Arrow");
     
    alert(arrowLinkHidden.innerHTML);
    alert(arrowLinkHidden.tagName);
     
    if(arrowLinkHidden.innerHTML != "")
    {
        arrowLinkHidden.innerHTML = "";
    }
}

I hope this helps.

Regards,
Kalina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Lubna Ansari
Top achievements
Rank 1
Answers by
Chip
Top achievements
Rank 1
Lubna Ansari
Top achievements
Rank 1
Simon
Telerik team
steven
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or