Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
155 views

Hello All,

 

Need an urgent help.

I am using the Radmenuitem in a User Contol and in Master Page.

 

I am trying to highlight the menu selected with different color else the user is lost in which menu is looking into.

I have to work on the Client side code, becuase when i click on the Menus the Page Load doesn't get called the Menu.ascx file.

Please help me with Setting teh CSS class on Client side when the Menu item is clicked.

I tried using OnClientItemClicked() but seems no difference.

Please find the code below.

<radM:RadMenu ID="mnuImport" Width="90%" runat="server" Skin="Black" OnClientItemClicked="ClientCSS();" CssClass="menu">       
        <Items>      
            <radM:RadMenuItem Text="Home" NavigateUrl="../home.aspx"></radM:RadMenuItem>      
            <radM:RadMenuItem Text="File" NavigateUrl="../home.aspx"></radM:RadMenuItem>      
            <radM:RadMenuItem Text="Edit" NavigateUrl="../home.aspx"></radM:RadMenuItem>      
            <radM:RadMenuItem Text="View" NavigateUrl="../home.aspx"></radM:RadMenuItem>      
        </Items>      
</radM:RadMenu>   
    
    
function ClientCSS(sender, eventArgs)  
    
        var menu = $find("<%= rmstabmenu.ClientID %>"); 
        var item = menu.findItemByText(home); 
        if (item != null)  
        
            item.CssClass = "Focussed"; 
        
    
    
<style
.Focused   
    {   
            
      color: Red !important;   
      background-color: Yellow !important;   
    }   
</style>

sudhakar
Top achievements
Rank 1
 answered on 06 Dec 2010
3 answers
117 views

Do you have a control to mimics similar behavior http://www.lidpluss.com/themeforest/columbia-wp/ ?

Please refer the "Login & SignUp" link to the top! 

sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 06 Dec 2010
4 answers
103 views
Hi Guys,

We have just noticed that when pasting from word documents that there are <b> and <i> tags. We would prefer that they convert to <strong> and <em> respecively.

We added the MozEmStrong property to our configfile.xml but have found that this only works for Firefox (obviously!) and not for IE. Is there a way to make it work for IE??

Cheers,

clarky
Raj Gupta
Top achievements
Rank 1
 answered on 06 Dec 2010
1 answer
158 views
Hi guys, I'm working with the menu and trying to set the transparency to the background colour of the first sublevel of the menu.

div.RadMenu .rmVertical .rmItem
       {    
           -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
           opacity: 0.3;  
           -moz-opacity: 0.3; 
           line-height: 25px;
           Text-indent: 10px;
           background-color: #1B3456;
           color: White;         
       }

The issue I'm having is that it is setting the transparency to the text it seems? How should I get the background to become transparent? Thanks in advance!

   div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
   div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
   div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
   div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
   div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
 div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
 div.RadMenu .rmVertical .rmItem 
        {     
           /* -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 
            opacity: 0.3;   
            -moz-opacity: 0.3;  */
            line-height: 25px;
            Text-indent: 10px;
            background-color: #1B3456;
            color: White;          
        } 
Kamen Bundev
Telerik team
 answered on 05 Dec 2010
1 answer
109 views
Dears,
I have the following CSS in Style.css file (All pages in the project have a link to Style.css file)
          .RadTreeView .rtLI
        {
            padding-bottom: 10px;
        }
        .RadTreeView .rtUL .rtUL
        {
            margin-top: 10px;
        }
        .RadTreeView .rtLast
        {
            padding-bottom: 0; /* prevent double-spacing */
        }
 

I want to apply it on one specific RadTreeView only. How can I specify the ID selector
Kamen Bundev
Telerik team
 answered on 05 Dec 2010
1 answer
156 views
Sir,
          I have an issue with Rad-active I Load control.While uploading the image, it will display sometimes. Sometimes it won't display the image message and show a java script error in IE.The sample code for this application is shown below,


<script type="text/javascript">
                //<![CDATA[

    function ILoad1_ValueChanged(controlId, webImage) {
        
        if (webImage) {
            var resize = webImage.GetResizeByName("Image2");
            var str = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
            str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
            str += "<img src=\"" + resize.FileUrl_NoCache() + "\" alt=\"\" style=\"border:none;\" />";
            str += "</a>";
            str += "</td></tr></table>";
            document.getElementById("ILoad1_Image2").innerHTML = str;
            

        }
        else {
            var str = "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
            str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
            str += "<img src=\"../Images/CompanyLogo/noimage.jpg\"  height=\"110px\" width=\"90px\" alt=\"\" style=\"border:none;\" />";
            str += "</a>";
            str += "</td></tr></table>";   
            document.getElementById("ILoad1_Image2").innerHTML = str;
          }
    }

    var ILoad1_PageLoad_Done = false;
    var ILoad1_ControlInitialized_Done = false;
    function ILoad1_PageLoad() {
        if (ILoad1_PageLoad_Done) {
            return;
        }
        ILoad1_PageLoad_Done = true;

        var controlId = "<% =this.ILoad1.ClientID %>";
        ILoad1_ValueChanged(controlId, Radactive.WebControls.ILoad.GetValue(controlId));
    }
    function ILoad1_ControlInitialized(controlId, webImage) {
        ILoad1_ControlInitialized_Done = true;
   
        listenEvent(window, "load", ILoad1_PageLoad);
    }
                //]]>   
</script>
<script type="text/javascript">
                //<![CDATA[
    if (ILoad1_ControlInitialized_Done) {
        ILoad1_PageLoad();
    }
                //]]>   
</script>




The control creation is like this,


 <RAWCIL:ILoad ID="ILoad1" runat="server" Appearance="Button" ForeColor="#0C55B1"
                                    CssClass="button-new" Width="100px" Height="25px"><Configuration ManualTemporaryFolder="False"
                                    OnCompleteBehavior="KeepFilesInTemporaryFolder"
                                    WebPublishedDestinationFolder="True" CutMode="Manual" KeepSourceImage="False"
                                    GenerateIconImage="False" GenerateSelectedImage="True"
                                    GenerateIndexXMLFile="True" InternalCode="" Title="">
                                    <TemporaryFolder Path="" UrlMode="Automatic" ManualUrl=""></TemporaryFolder>
                            <DestinationFolder Path="" UrlMode="Automatic" ManualUrl=""></DestinationFolder>
                            <WebImageDefinitions>
                             <Radactive.WebControls.ILoad.Configuration.WebImageDefinition InternalCode="Default" Title="Default"><SizeConstraint Mode="FreeSize">
                             <FixedSizeData Size="400, 300"></FixedSizeData>
                             <FixedAspectRatioSizeData Size="400, 300" LimitedDimension="Width">
                               <Limits>
                                 <LowLimit Enabled="False" Value="300"></LowLimit>
                                 <HiLimit Enabled="False" Value="400"></HiLimit>
                               </Limits>
                             </FixedAspectRatioSizeData>
                             <FreeSizeData>
                               <LimitsW>
                                 <LowLimit Enabled="False" Value="300"></LowLimit>
                                 <HiLimit Enabled="False" Value="400"></HiLimit>
                               </LimitsW>
                               <LimitsH>
                                 <LowLimit Enabled="False" Value="300"></LowLimit>
                                 <HiLimit Enabled="False" Value="400"></HiLimit>
                               </LimitsH>
                             </FreeSizeData>
                             </SizeConstraint>
                             <OutputOptions FormatMode="Custom" Format="b96b3cae-0728-11d3-9d7b-0000f81ef32e" JPEGQuality="92" JPEGForceRecompression="False"></OutputOptions>
                             </Radactive.WebControls.ILoad.Configuration.WebImageDefinition></WebImageDefinitions><WindowsAppearance><ImageUploadWizardWindow WindowTitle="RADactive I-load" TopLogoImageUrl="" ShowWelcomePage="True" ShowSummaryPage="True" WelcomePageText="" ShowImagePreviewBeforeFileUpload="True" ShowSaveButtonDuringImageEdit="True" CropperCanvasColor="White" HTMLCropperCanvasColor="White" AutoZoomCropperView="True"></ImageUploadWizardWindow><PreviewWindow WindowTitle="RADactive I-load - Preview" AllowImageDownload="True" AllowImagePrint="True"></PreviewWindow></WindowsAppearance><InputOptions><UploadableFileSizeLimits><LowLimit Enabled="False" Value="1"></LowLimit><HiLimit Enabled="False" Value="2097152"></HiLimit></UploadableFileSizeLimits><SourceImageSizeLimitsW><LowLimit Enabled="False" Value="300"></LowLimit><HiLimit Enabled="False" Value="400"></HiLimit></SourceImageSizeLimitsW><SourceImageSizeLimitsH><LowLimit Enabled="False" Value="300"></LowLimit><HiLimit Enabled="False" Value="400"></HiLimit></SourceImageSizeLimitsH><FileExtensionValidator DefaultBehavior="AcceptAll" AcceptedFileExtensions="" NotAcceptedFileExtensions=""></FileExtensionValidator></InputOptions><ImageCropperOptions AllowImageResize="True" AllowImageZoom="True" AllowImageRotate="True" AllowImageFlip="True"></ImageCropperOptions></Configuration></RAWCIL:ILoad>            
                                       
                                        <div style="text-align:middle" id="ILoad1_Image2" class="ILoad_CustomAppearance_DivImage"
                                            onmouseover="this.className='homeimghover'" onmouseout="this.className='ILoad_CustomAppearance_DivImage'">
                                        </div>


The screen shot for the error message is attached below. Please reply ASAP.


Thanks in Advance
Anju S Chandran


Kamen Bundev
Telerik team
 answered on 04 Dec 2010
1 answer
149 views
Is there any sort of demo somewhere on a Fixed position dock bottom implementation of the RadToolBar (that works on IE6?...since it can't do fixed)

Or should I look elsewhere...
Kamen Bundev
Telerik team
 answered on 04 Dec 2010
1 answer
104 views
Hello,

I have some pages with a significant amount of Telerik controls which can sometimes take 2-4 seconds to load in Firefox. I have noticed that sometimes, if the user mouses over a Telerik control on the page before it has been completely loaded (before FormDecorator styles have been applied), the page will throw a javascipt error in

Sys.Application.add_init(function()  $create(Telerik.Web.UI.RadToolBar, {"_cssClass":"","_rawPostBackReference":"WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions
 ...
 });

The error says "[Client-side event handler function name] is undefined" and then the page completely pukes and I cannot interact with any controls. I was wondering if this issue has ever been seen before and if there is a solution for it.

Thanks
Kamen Bundev
Telerik team
 answered on 04 Dec 2010
1 answer
163 views
We have a situation where users can filter a grid, using custom code that sets the mastertableview.filterexpression value, but can then choose to edit or drill down.

What I'd like to do is to restore the most recent filter settings when the user returns to the page. Ideally I'd also like to restore the dropdown and textbox values in my form, but that's secondary.

Does the Grid provide any mechanism to do that? If not, any suggestions about a best-practices approach?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 04 Dec 2010
6 answers
239 views
Hi there,

I am using edit mode of type PopUp for doing update/insert using radgrid. i have used OnUpdateCommand="RadGrid1_UpdateCommand" event and defined it on code behind. but when i click on update button on popup form after modifying text fields, my update command event is not triggering and page shows like it got updated even though not. please anyone provide me solution. Delete works fine and delete event triggers as normal so problem is only with edit update event.  here is a part of my code,

<telerik:RadGrid ID="RadGrid1" AllowSorting="true" AllowPaging="true" 
PageSize="10" AutoGenerateColumns="false" runat="server" OnUpdateCommand="RadGrid1_UpdateCommand"   
OnDeleteCommand="RadGrid1_DeleteCommand" AllowAutomaticUpdates="false">
<MasterTableView DataKeyNames="i_UserId" 
EditMode="PopUp" AllowFilteringByColumn="True" Width="100%" TableLayout="Auto">
    <Columns>
        <telerik:GridBoundColumn 
Visible="False" UniqueName="FirstName"   HeaderText="First Name" DataField="s_FirstName" EditFormColumnIndex="0">                                            
        </telerik:GridBoundColumn
        <telerik:GridBoundColumn 
Visible="False" UniqueName="FirstName"   HeaderText="First Name"<BR> DataField="s_FirstName" 
                    EditFormColumnIndex="0"><BR>                                            
        </telerik:GridBoundColumn>
    <Columns/>
    <EditFormSettings 
ColumnNumber="3" CaptionFormatString="Edit details for User: {0}" 
        EditFormType="AutoGenerated" PopUpSettings-Width="70%" PopUpSettings-Modal="true" 
        EditColumn-Resizable="true"  PopUpSettings-ScrollBars="Auto" CaptionDataField="s_Name">                                                
    <FormTableItemStyleWrap="true"></FormTableItemStyle><BR>                                                
    <FormCaptionStyle CssClass="EditFormHeader" ForeColor="Blue"></FormCaptionStyle>                                               
    <FormMainTableStyle GridLines="Both" CellSpacing="0" CellPadding="3" Width="100%" HorizontalAlign="Justify"/>                                               
    <FormTableStyle GridLines="None" CellSpacing="2" CellPadding="2" CssClass="module" Height="110px"/>                                               
    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>                                                
    <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle><BR>                                                
    <EditColumn UpdateText="Update record" ButtonType="PushButton" UniqueName="EditCommandColumn1" CancelText="Cancel edit">                                                
    </EditColumn><BR>                                                
    <FormTableButtonRowStyle HorizontalAlign="Center" ForeColor="Blue" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>                                                                                      
    </EditFormSettings><BR>                                            
    <ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn"><BR>                                                
    <HeaderStyle Width="15px"></HeaderStyle><BR>                                            
    </ExpandCollapseColumn>
  </MasterTableView> 
</
telerik:RadGrid>

And my code behind looks ike this,
      protected void RadGrid1_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;  
            int intUserId = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["i_UserId"].ToString());
            string strLastName = (editedItem["LastName"].Controls[0] as TextBox).Text;
            string strFirstName = (editedItem["FirstName"].Controls[0] as TextBox).Text; 
            ..........
            ..........
            ...........
            }

When debug this, control doesnt move to the above block when i click on upadte button.


Thanks & Regards,
Ash
Ash
Top achievements
Rank 1
 answered on 04 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?