Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
340 views
Hello,

I'm having trouble overriding the default .rcbHover css in a customized skin.

I have a single ComboBox with a custom skin derived from Web20.  I have a situation where I need to apply a specific item style based on some conditions.  I do this by setting the RadComboBoxItem's CssClass property in the code-behind.  The problem I'm encountering is that when the user hovers over the specific item with the new class I get the default hover class.

My code may help explain:

ASPX:
<script language="javascript" type="text/javascript"
    function cboOpening(sender, eventArgs) 
    { 
        //alert('cboOpening() called.'); 
       if (sender.get_items().get_count() <= 1) 
         sender.requestItems(sender.get_text(),false); 
    } 
</script> 
 
 
<telerik:RadComboBox ID="cbo" Runat="server" Height="200px" Width="400px" AutoPostBack="true" 
    EnableLoadOnDemand="false" 
    ShowDropDownOnTextboxClick="true" 
    MarkFirstMatch="true" 
    AllowCustomText="false" 
    ShowMoreResultsBox="false" 
    ItemRequestTimeout="500" 
    OnItemsRequested="cbo_ItemsRequested" EnableViewState="false"  
    OnSelectedIndexChanged="cbo_SelectedIndexChanged" 
    OnClientDropDownOpening="cboOpening"
</telerik:RadComboBox> 

C#:
protected void Page_Load(object sender, EventArgs evt) 
    if (!Page.IsPostBack) 
    { 
        cbo.Items.Clear(); 
        cbo.Items.Add(new RadComboBoxItem(some_text)); 
            cboHEs.SelectedIndex = 0; 
    } 
 
 
public void cbo_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs evt) 
    SessionMgr.ValidateSession(); 
    LoadCBO(); 
 
 
protected void cbo_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs evt) 
    string selectedText = cbo.Text; 
    if ((selectedText != null) && (selectedText .Trim().Length > 0)) 
    { 
         // Do some stuff... 
    } 
 
 
protected void LoadCBO() 
    cbo.Items.Clear(); 
 
    foreach (Object obj in ObjectList) 
    { 
        RadComboBoxItem item = new RadComboBoxItem(obj.ToString()); 
 
        cbo.Items.Add(item); 
 
        if (_someCondition_) 
        { 
            item.CssClass = "NewOverrideClass"
        } 
    } 

Finally the CSS:
.RadComboBoxDropDown_CustomSkin .NewOverrideClass 
    background-image: url('image.gif'); 
    background-repeat: no-repeat; 
    background-position: top right; 
    padding: 2px 6px; 
    margin: 0 1px; 
 
.RadComboBoxDropDown_CustomSkin .rcbHovered // <-- This is the default hover class 
    padding: 1px 18px 1px 5px; 
    border: 1px solid #bcd2f1; 
    background: #e7f1ff; 
    color: #0f3789; 
 

I've tried overriding by trying CSS inheritance (probably wrong)...

.RadComboBoxDropDown_CustomSkin .NewOverrideClass .rcbHovered
{
padding: 1px 18px 1px 5px;
border: 1px solid #bcd2f1;
background: #e7f1ff;
color: #0f3789;
}

Any help is appreciated!
-Allen

Allen Smothers
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
122 views
Hi Guys !

I have been using RAD FILE EXPLORER as am important control in my Project for a quite some while.

When I try to delete the file or any folder , it pops -out the DELETE Confirmation Box with 'UPLOAD' written at the TOP.

Since it is performin th REQUIRED action, nothin to worry for me, BUT the issue is that I want 'DELETE' instead of 'UPLOAD'

as shown in the pic I have attached/as shown in your DEMO example.

Plz help !!
Fiko
Telerik team
 answered on 09 Dec 2009
4 answers
106 views
Hi,

I have a Tree within a Dock. What we do is drag a node from the tree and drop it somewhere outside of the dock. The tree is far taller than the dock is, so users have to scroll within the dock to navigate the tree and get to the node they want, which is fine. However, once the dragging operation has started, dragging the node above or below the tree will make it to scroll up or down. Seeing as how in most cases, we drag a node and drop it below the dock (thus below the tree), the result is that each time the dock/tree scrolls all the way down and we have to manually scroll up back to the node we just dragged.

Is it possible to prevent scrolling when dragging a node?

Thanks
Simon Hancock
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
95 views
Hello,

I'm trying to bind a Panel Bar with data from 3 tables with Foreign Key relationship.

Departments  --> Categories   --->    Products
---------------------------------------------------------
DepartmentId     CategoryId              ProductId
Name                 DepartmentId(fk)    CategoryId(fk)
                           Name                     Name

I access these tables via methods:
  • LoadDepts();
  • LoadCategories(int deptId);
  • LoadProducts(int catId);

I can bind to the panel bar like this and return a list of departments.  But I'm having problems getting the categories to persist as PanelBarItems.
Departments depts = new Departments();  
depts.Load();  
  
pnlbarDepartments.DataSource = depts;  
pnlbarDepartments.DataTextField = "DisplayText";  
pnlbarDepartments.DataValueField = "ID";  
pnlbarDepartments.DataBind(); 

I've come aross this post referencing this example explaining manual creation of the panel bar items.  The example shows how to do this using an OleDbDataAdapter.

How can I create this scenario using my methods ?
OR
Is there an alternative way of doing this ?

Thank you in advance,
Ronnie
Veselin Vasilev
Telerik team
 answered on 09 Dec 2009
2 answers
180 views

In Mozilla Firefox and Google Chrome on a DropDownList of a RadComboBox the list is displayed below the flash, in Internet Explorer it works correctly.  Also the same thing happens with RadDatePicker
How can achieve the compatibility with Firefox and Google Chrome

    <div>
    <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true"  runat="server">
   <Items>
       <telerik:RadComboBoxItem runat="server" Text="-- Select item --" />
       <telerik:RadComboBoxItem runat="server" Text="Item with No Value" />
       <telerik:RadComboBoxItem runat="server" Text="Item with Value=1" Value="1" />
       <telerik:RadComboBoxItem runat="server" Text="Item with Value=2" Value="2" />
   </Items>
</telerik:RadComboBox>
    </div>
     <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
           codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
           width="1000" height="78">
    <param name="movie" value="header_v8.swf?button=1" />
    <param name="quality" value="high" />
    <param name="menu" value="false" />
    <!--[if !IE]> <-->
    <object data="header_v8.swf?button=1"
            width="1000" height="78" type="application/x-shockwave-flash">
     <param name="quality" value="high" />
     <param name="menu" value="false" />
     <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />    
    </object>
    <!--> <![endif]-->
   </object>

Yana
Telerik team
 answered on 09 Dec 2009
1 answer
103 views
Greetings,

We have implemented the load on demand using webservice feature of the RADMenu, but it blows up with the following error:
Microsoft JScript runtime error: 'this._slide' is null or not an object

Our implementation follows the examples exactly, and I have verified using Trace.WriteLineIf() that there are indeed 12 RadMenuItemData objects for the menu to use.

Any ideas?
T. Tsonev
Telerik team
 answered on 09 Dec 2009
1 answer
249 views
Can any one please explain how can we connect to and display the contents from sharepoint folder and files in this File explorer control ?
Fiko
Telerik team
 answered on 09 Dec 2009
2 answers
147 views

I've attached a couple of images showing my issue.  We are using the RadMenu on our master page and using the 2008.Q3 skin named "Default" by utilizing the Direct Skin registration method detailed in this post: http://www.telerik.com/community/forums/aspnet-ajax/menu/radmenu-q3-2008-skins-available-for-download.aspx

This has been working well and the menu is rendered in the old default skin, see telerikexample1.jpg.  On one page on our site we have a RadScheduler.  The issue is that when I add an Appointment context menu to the RadScheduler the RadMenu changes to the new Default skin, see telerikexample2.jpg. 

Here is the RadScheduler code:

<telerik:RadScheduler ID="RadScheduler1" runat="server" ShowFooter="False" TimeZoneOffset="00:00:00" 
                        SelectedView="MonthView" TimelineView-UserSelectable="false" EnableEmbeddedSkins="true" 
                        OverflowBehavior="Scroll" OnAppointmentUpdate="RadScheduler_AppointmentUpdate" 
                        DataKeyField="TransactionID" DataStartField="ServiceStartTime" DataEndField="ServiceEndTime" 
                        DataSubjectField="Subject" OnAppointmentDataBound="RadScheduler_AppointmentDataBound" 
                        OnFormCreating="RadScheduler_FormCreating" HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" 
                        StartEditingInAdvancedForm="false" StartInsertingInAdvancedForm="False" EnableRecurrenceSupport="false" 
                        CustomAttributeNames="OrdersDisciplineCode,ProcessingStatus,EncounterID,TransactionID,EditLinkURL,DeleteLinkURL" 
                        AdvancedForm-EnableCustomAttributeEditing="true" RowHeight="18" OnNavigationCommand="RadScheduler1_NavigationCommand" 
                        OnTimeSlotCreated="RadScheduler_TimeSlotCreated" ColumnWidth="90" Height="510px" 
                        Width="649px" EnableAdvancedForm="false" AllowDelete="false">  
                        <MonthView VisibleAppointmentsPerDay="10" ReadOnly="true" /> 
                        <TimelineView UserSelectable="False" /> 
                        <TimeSlotContextMenuSettings EnableDefault="false" /> 
                        <AppointmentContextMenus> 
                            <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu" Skin="Default" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">  
                                <Items> 
                                    <telerik:RadMenuItem Text="Edit" Value="CommandEdit" ImageUrl="~/Images/page_white_edit.png" /> 
                                    <telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="~/Images/Delete.gif" /> 
                                </Items> 
                            </telerik:RadSchedulerContextMenu> 
                        </AppointmentContextMenus> 
                    </telerik:RadScheduler> 

If I remove the AppointmentContextMenus block, the RadMenu renders using the old Default skin correctly.

How do I override the way the AppointmentContextMenus style seems to affect the RadMenu?

Thanks,
Bryan
T. Tsonev
Telerik team
 answered on 09 Dec 2009
2 answers
675 views

Ok I have some very odd behavior with a radgrid.  I am trying to set it up so that it will filter the columns when the enter key is hit.  I have set up the gid and it never seems to acknowledge the enter key being pressed, but it will work when I hit the tab key.  I can live with this if necessary, but the odd thing is this.

When the page loads I can filter the column, case sensitive, on whatever column I have set up with AutoPostBackOnFilter = true.  The issue is when I go to another column and try to filter it.  If it is not set to AutoPostBackOnFilter and use the GUI drop down it works.  But if I try and filter on another column with AutoPostBackOnFilter set to true the grid does not filter and blanks out the filter box when I tab off it.

 More odd behavior I can keep filter on whatever column I first filtered on with no issue, except when I do certain things, like try to filter on another column with the Autopost back set and then remove filter on a column without autopostback and then try to filter with my original column.  Then it does the same thing blanks the filter box and does not filter.

 It always filters if I do not use autopostback.  Here is some of the code.

 

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"   
                    GridLines="None" 
                    Skin="WebBlue" AllowFilteringByColumn="True" 
                    AutoGenerateColumns="False" 
                    EnableTheming="False" onneeddatasource="RadGrid1_NeedDataSource"   
                    ShowGroupPanel="True">     
               <HeaderContextMenu EnableTheming="True">                  
               <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
               </HeaderContextMenu> 
               <MasterTableView  DataKeyNames="ClientID">  
               <RowIndicatorColumn> 
                  <HeaderStyle Width="20px"></HeaderStyle> 
               </RowIndicatorColumn> 
               <ExpandCollapseColumn> 
               <HeaderStyle Width="20px"></HeaderStyle> 
               </ExpandCollapseColumn> 
               <Columns> 
                   <telerik:GridBoundColumn DataField="ClientID" DataType="System.Int32"   
                       HeaderText="ClientID" ReadOnly="True" SortExpression="ClientID"   
                       UniqueName="ClientID" Visible="false">  
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name"   
                       SortExpression="LastName" UniqueName="LastName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" > 
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" 
                       SortExpression="FirstName" UniqueName="FirstName">  
                   </telerik:GridBoundColumn>                     
                   <telerik:GridBoundColumn DataField="RecordAccountName" HeaderText="Account Name"   
                       SortExpression="RecordAccountName" UniqueName="RecordAccountName">  
                   </telerik:GridBoundColumn>                     
                   <telerik:GridBoundColumn DataField="StrategyTypeDescription"   
                       HeaderText="Strategy" SortExpression="StrategyTypeDescription"   
                       UniqueName="StrategyTypeDescription" Groupable="true" GroupByExpression="StrategyTypeDescription, Sum(InitialInvestmentAmount) GroupTotal [Group Total]  Group By StrategyTypeDescription">  
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn DataField="IntermediaryDescription"   
                       HeaderText="Intermediary" SortExpression="IntermediaryDescription"   
                       UniqueName="IntermediaryDescription">  
                   </telerik:GridBoundColumn> 
That is some of the grid code

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
 
            RadGrid1.DataSource = ClientBLL.GetClientsNotInvested();  
                    } 
        public static List<APAPortal.vw_clients_pending> GetClientsNotInvested()  
        {  
            APADataContext db = new APADataContext();  
            var query = from c in db.vw_clients_pendings  
                        select c;  
              
            return query.ToList();  
 
        } 
Any ideas?  I have tried to set the grid with RadAjaxControl, and numerous other ways.

Sorry just discoverd that it is using controls version 2008.3.1314.  This might be the issue

Eric Klein
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
106 views
How to find label inside the appointment template in radscheduler.....
Shinu
Top achievements
Rank 2
 answered on 09 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?